Programming Examples
Python program demonstrating working with power operator
Program demonstrating working with power operator
Solution
x=int(input("Please enter an integer:"))
print('value of x=',x)
print('x**2=',x**2)
print('x**3=',x**3)
print('x**4',x**4)
Output
Please enter an integer:2
value of x= 2
x**2= 4
x**3= 8
x**4 16