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ᴺ

18th Sep 2021, 10:20 PM
Ashton Legere
4 odpowiedzi
+ 1
a=500*24 print(a) Or print(500*24)
18th Sep 2021, 10:22 PM
Abhay
Abhay - avatar
+ 1
Thank you im new and learning
18th Sep 2021, 10:27 PM
Ashton Legere
+ 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.
18th Sep 2021, 10:39 PM
Amirreza
Amirreza - avatar
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.
19th Sep 2021, 1:23 AM
Python Learner
Python Learner - avatar