How do 2 * work in python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do 2 * work in python

At the start it was simple math but when i got to floats it said 2**5=32 how do you get that answer?

14th May 2020, 3:45 PM
Hal0Pr012
Hal0Pr012 - avatar
2 Answers
+ 1
Thanks
14th May 2020, 3:47 PM
Hal0Pr012
Hal0Pr012 - avatar
+ 1
Here '**' denotes the power of a number. For example-: 2**5 means that 2 will muliply 5 times by the number itself. here's how exponents and powers drives(works) in real maths(but with python's syntax): 5**3 (question) = 5*5*5 = 125 (the answer)
14th May 2020, 5:33 PM
Rellot's screwdriver
Rellot's screwdriver - avatar