0
How am I supposed hi can’t do math
I’m stuck on the question asking 500*24 I’m not sure what I’m doing wrong I copy and pasted it below. 500*2ᴺ
4 Respostas
+ 1
a=500*24
print(a)
Or
print(500*24)
+ 1
Thank you im new and learning
+ 1
Use eval function:
Print(eval(500*24))
eval() function is a good idea for mathematics basic things (+,-,*,**,sum, and...)
You can take the argument as input so it will be a basic calculator.
0
Hi Ashton!
In Python, "**" operator is used for exponentiation(power) whereas "*" is to multiplication. So, the above expression 500*2ᴺ can be written like this.
500*2**N
Here, N is a defined value that is 24.