Q:

Python program to find power of a number using exponential operator

belongs to collection: Python basic programs

0

Python program to find power of a number using exponential operator

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Finding power of integer values

# python program to find the power of a number

a = 10
b = 3

# calculating power using exponential oprator (**)
result = a**b

print (a, " to the power of ", b, " is = ", result)

Output

10  to the power of  3  is =  1000

Finding power of float values

# python program to find the power of a number

a = 10.23
b = 3.2

# calculating power using exponential oprator (**)
result = a**b

print (a, " to the power of ", b, " is = ", result)

Output

10.23  to the power of  3.2  is =  1704.5197114724524

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Python basic programs

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Python program to find the power of a number using... >>
<< Python program to check whether a given number is ...