- 2
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
7 Antworten
+ 7
Ria Zakkia ,
before we can help you, you should show us your attempt first. if you have not done a try by yourself upto now, please do so. Put your code in playground and link it here.
thanks!
0
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).
Task:
Write a program to calculate the amount that will result from the doubling to understand which choice results in a larger amount.
0
1000000*(2**30)
0
That would be the formula for doubling the 1.000.000 every day.
0
print(0.01*(2**30))
0
Here you are trying to compare how much you would have at the end of the month if you chose $1.000.000 compared to getting 0.01 which will double everyday for a period of 30 days.
The Syntax will be
print(0.01(2**30))//double is 2 which you raise to power 30 then multiply by 0.01
0
print(0.01* 2**30) you have to do squared first