Python pow() function

Published February 16, 2022

Pow() function calculates the power of the specified number. First, it converts its arguments into floats, and then it finds the power of those floats.

Syntax
The syntax of the pow()  function is:

pow(a,b,c)

where:
a: is the base
b: is the exponent
c: the modulus number


Example

x = pow(6, 3, 5)
print(x)


Output

1

 

 

Download Source code

 

Article Contributed By :
https://www.rrtutors.com/site_assets/profile/assets/img/avataaars.svg

255 Views