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 Answers
+ 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.