KnowledgeBoat Logo
|

Computer Science

For which set of values will the Python code (s = (a**4) + 5*5**(b + b)) give the output as: 141?

  1. a = 1, b = 2
  2. a = 3, b = 2
  3. a = 2, b = 1
  4. a = 3, b = 1

Getting Started

2 Likes

Answer

a = 2, b = 1

Reason — For a=2, b=1:

s = (24) + 5 * (52) = 16 + 5*25 = 16 + 125 = 141

Answered By

3 Likes


Related Questions