Important Notice:

Course Content
The Calendar Module
Library Function/Predefined Functions
0/4
Sys Module
Library Function/Predefined Functions
0/2
OS Module
Library Function/Predefined Functions
0/2
Functions in Python (Chapter-10) M3-R5
About Lesson

pow():-

        The pow(x,y) function returns the value of x raised to the power of y, i.e. xy.

Both pow() and the double star (**) operator perform exponentiation.  ** is an operator and pow() is a built-in function.

Note:-1. ** operator, math.pow() converts both its arguments to type float.

  1. use ** or the built in pow() function for computing exact integer powers.

Example:-

import math

print(math.pow(2,2))

print(pow(2,2))

print(pow(2,-2))

Output

4.0

4

0.25

error: Content is protected !!