+ 1

Write a program to calculate the amount that will result from the doubling to understand which choice results in a larger amount

Please help me to solve this task

8th Dec 2020, 7:12 PM
lakshmi pathi
lakshmi pathi - avatar
12 Réponses
+ 3
print(0.01(2**30))
8th Dec 2020, 7:32 PM
lakshmi pathi
lakshmi pathi - avatar
+ 3
I got it Bro Print (0.01*(2**30)
8th Dec 2020, 8:07 PM
lakshmi pathi
lakshmi pathi - avatar
+ 2
total= 0.01 for i in range(30): #the rest is leaved to you. #try to find out
8th Dec 2020, 7:40 PM
Shadoff
Shadoff - avatar
+ 1
I am glad to, but liiiiiitle accordance needed from you, the code
8th Dec 2020, 7:19 PM
Shadoff
Shadoff - avatar
+ 1
Then show not working code
8th Dec 2020, 7:25 PM
Shadoff
Shadoff - avatar
+ 1
Ok, the task is clear, half done. Now to make well done post the link of you code, sorry your try
8th Dec 2020, 7:29 PM
Shadoff
Shadoff - avatar
+ 1
No!
8th Dec 2020, 8:10 PM
Shadoff
Shadoff - avatar
+ 1
for i in range(30): total +=0.01*(2**i) print(total)
8th Dec 2020, 8:11 PM
Shadoff
Shadoff - avatar
+ 1
print(0.01*(2**30)) # or (2*2*2*2...)/100
9th Dec 2020, 8:43 PM
Methusela Daūdi Taāh
Methusela Daūdi Taāh - avatar
0
Exponentiation is the raising of one number to the power of another. This operation is performed using two asterisks **. 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). Task: Write a program to calculate the amount that will result from the doubling to understand which choice results in a larger amount.
8th Dec 2020, 7:27 PM
lakshmi pathi
lakshmi pathi - avatar
0
Ok bro
8th Dec 2020, 7:41 PM
lakshmi pathi
lakshmi pathi - avatar