- 5
Write a program to calculate the amount that will result from the doubling to understand which choice results in a larger amount
Please tell me how to make
22 Respuestas
+ 32
for i in range(30,31):
if i==30:
print(0.01*(2**i))
else:
print(0.01*(2**i),end=' ')
try this
+ 7
x=1000000
y=0.01*(2**30)
print(max(x,y))
+ 5
print(0.01*(2**30))
+ 3
print(0.01*(2**30))
+ 1
Is it working fine?
I think, question is about "find 1.000.000 is greater or per day 0.01 (double every day) is greater.. So
If 0.01/day then 3 days : 0.01*2*2*2 =>0.01*(2**3)
So for 30days : 0.01*(2**30)
Then compare
if 1000000>0.01*(2**30) : print(" greater")
I think this what is asking about but am not sure.. Not tested..
0
Thanks for explaining
0
Is that correct answer?
x = 1000000
y = 0.01*(2**30)
if y < x:
print (x)
else:
print (y)
0
for i in range(30,31):
if i==30:
print(0.01*(2**))
else:
print(0.01*(2**i),end='')
0
thx
0
print(" 10737418.24")
0
for a in range(30,31):
if a==30:
print(0.01*(2**a))
else:
print(0.01*(2**a),end=' ')
0
for i in range(30,31):
if i==30:
print(0.01*(2**i))
else:
print(0.01*(2**i),end=' ')
- 1
a=30
b=31
c=0.01
for i in range(a,b):
if i==a:
print(c*(2**i))
else:
print(c*(2**i),end=' ')
- 1
total=0.01
for i in range(30):
total+=0.01*(2**i)
print(total)
- 1
Its very simple;
print(0.01*(2**30))
- 2
Can you clarify your question?
- 2
I think there you need find dollars for 30 for days $0.01 as 0.01*(2**30) and then compare it with other choice..
- 2
Thanks but can you explain it to clearly
- 2
NUSHRAT you're welcome..
May I know is that working fine?
- 2
for i in range(30,31):
if i==30:
print(0.01*(2**i))
else:
print(0.01*(2**i),end=' ')