Write a Python program to find power of any number x ^ y.

PROGRAM

# Python program to find power of any number (x ^ y)
# Input from the user
x = float(input(“Enter the base number (x): “))
y = float(input(“Enter the exponent (y): “))
# Calculate power
result = x ** y
# Display the result
print(f”{x} raised to the power {y} is: {result}”)

OUTPUT

TRY THE ABOVE CODE

Leave a Reply

Your email address will not be published. Required fields are marked *

sign up!

We’ll send you the hottest deals straight to your inbox so you’re always in on the best-kept software secrets.