I cant answer exponentiation | Sololearn: Learn to code for FREE!


I cant answer exponentiation

Let's use exponentiation to solve a known problem. You are offered a choice of either $1.000.000 or $0.01 (one penny) doubled every day for 30 days (the resulting amount is doubled every day). I dont understand

4/11/2021 8:58:12 PM

Eros Blue Prince 💙

8 Answers

New Answer


Before you consider solve the problem with Python, you have to understand how to solve it mathematically. Can you solve it mathematically?


a=1000*(2**30) b=0.01*(2**30) if a > b: print(b) else: print(a)


Yes Per i understand it Thx


you either chose 1,000,000 or (0.01×2^30), so after 30 days this amount becomes 10,737,418.24. the second choice is better.


I cant answer two cases at the same time


Thats about mathematical relations: if Case_A > Case_B: print(“Case_A is better “) elif Case_A < Case_B: print(“Case_B is better“) else: print(“Case_A and Case_B are equal.“)


Obviously I missunderstood you. So what do you mean with “I cant answer two cases at the same time”?


First solve the problem mathematically, then implement it.