22.WAP to calculate X ^n where x is float and n is integer variable

CODE:

x=float(input("Enter the Value on x\n"))
n=int(input("Enter the Value on n\n"))
product=x**n
print(x,"raised to power",n,"is",product)

OUTPUT:

Enter the Value on x 6 Enter the Value on n 2 6.0 raised to power 2 is 36.0

Comments

Popular posts from this blog