Write a python program that prompts the user to enter two integers x and y. The program then calculates and displays x^y.
PROGRAM:
x=int(input("Enter x:"))
y=int(input("Enter y:"))
p=x**y
print("x^y:",p)
OUTPUT:
Enter x: 2
Enter y: 3
x^y: 8
No comments:
Post a Comment