Computer Science
For which set of values will the Python code (s = (a**4) + 5*5**(b + b)) give the output as: 141?
- a = 1, b = 2
- a = 3, b = 2
- a = 2, b = 1
- a = 3, b = 1
Getting Started
3 Likes
Answer
a = 2, b = 1
Reason — For a=2, b=1:
s = (24) + 5 * (52) = 16 + 5*25 = 16 + 125 = 141
Answered By
1 Like
Related Questions
Which of the following codes is correct?
1.
print("Programming is fun") print("Python") print("Computer Science")2.
print ("Programming is fun) print("Python") print("Computer Science)3.
Print("Programming is fun") print("Python") print("Computer Science")4.
Print("Programming is fun") Print("Python") Print("Computer Science")Python is a case-sensitive language. This means …………… .
- Capital and small letters are same for Python
- Python doesn't care about the case of alphabets
- Python treats capital and small letters as different
- Python automatically capitalizes the small letters
…………… mode of Python gives instant result of typed statement.
- Interactive mode
- Script mode
- Both Interactive and Script mode
- None of these
Assertion (A): Python is a cross-platform language.
Reasoning (R): Python code can run on a variety of platforms which makes programs very portable as any program written in one platform can easily be used on another.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.