0

powering in python

do powering in python

31st Jul 2018, 10:53 AM
POONTHAMILAN.V
POONTHAMILAN.V - avatar
2 Answers
- 1
i got it.... powering in python can be done using two ** this will be used between the number to be powered and the number used to power (i.e) 2**3=8
31st Jul 2018, 11:01 AM
POONTHAMILAN.V
POONTHAMILAN.V - avatar
+ 1
Use the ** operator to write exponents e.g. 3**2 = 3 * 3 5**3 = 5 * 5 * 5 2**4 = 2 * 2 * 2 * 2
31st Jul 2018, 10:56 AM
TurtleShell
TurtleShell - avatar