- 5
Please tell me the code for exponentiation in python 3 project 1
I wrote a code but it doesn't execute
21 odpowiedzi
+ 15
This is what I did.
x = 1.000*0.01 *(2**30)
y = 0.01 *(2**30)
if x>y:
print (x)
else:
print (y)
Hope it helps 😊
+ 7
x=1000000
y=0.01*(2**30)
if x>y:
print (x)
else:
print(y)
+ 2
res = 0.01*(2**30)
Print(res)
+ 1
This is the easy answer for me
# your code goes here
amount = 0.01
day = 0
while True:
amount = amount + amount
day += 1
if day == 30:
break
print(amount)
+ 1
def Exponentiation(day):
return 0.01 * (2**day)
def main():
day = 30
print(Exponentiation(day))
if __name__ == "__main__":
main()
0
Thank you harold Peter
It helps me
0
{Try this :[PYTHON03-PROJECT01]}
print(0.01*(2**30))
.
.
.
THANK ME LATER.
0
Direct do this
print(10787318.24)
0
"This is what I did.
x = 1.000*0.01 *(2**30)
y = 0.01 *(2**30)
if x>y:
print (x)
else:
print (y)
Hope it helps 😊"
How come is that the task was talking about 1.000.000, but you used 1.000 as the "x" variable?
0
print(0.01*(2**5))
- 1
Show us your code so that we can help you
for exponentiation we use ** for example
2**3 = 2×2×2
2**4 = 2×2×2×2
- 1
Try writing int before inputting
Only numbers could be exponentiated not strings
A= int(input(.....
- 1
Already tried in that way also
- 1
This worked for me..
Note : Split lines while inputting
A=int(input('enter num1 :'))
print(A)
B=int(input ('enter num2 :'))
print(B)
c=A**B
print(c)
- 1
Ok
- 1
FOR exponentiation you have to ** just like 2**5 = 32
- 1
res = 0.01*(2**30)
print(res)
- 1
def gg():
btr=500
time=2
hr=24
print(btr*(time**hr))
gg()
- 2
A=input('enter num')
B=input ('enter num')
c=A**B
print (c)
- 2
I just learned this so
pow(yourbase, yourexponent, modulus(which is optional))
so pow(2,2) == 4
that might work