Python | sympy.Pow() method
Last Updated :
28 Aug, 2019
With the help of sympy.Pow() method, we can find a raised to the power of b where a and b are parameters to the method.
Syntax: Pow(a, b)
Parameter:
a – It denotes an integer.
b – It denotes an integer.
Returns: Returns an integer which is equal to a raised to the power of b, i. e., a^b.
Example #1:
from sympy import Pow
a = 3
b = 3
pow_a_b = Pow (a, b)
print ( "{}^{} = {}" . format (a, b, pow_a_b))
|
Output:
3^3 = 27
Example #2:
from sympy import Pow
a = 5
b = 4
pow_a_b = Pow (a, b)
print ( "{}^{} = {}" . format (a, b, pow_a_b))
|
Output:
5^4 = 625
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...