# Using a for loop to calculate pow(x,n)
x = int(input("Enter the value of x: ")) # Get the value of x from user input and convert it to integer
n = int(input("Enter the value of n: ")) # Get the value of n from user input and convert it to integer
power = 1 # Initialize power as one
for i in range(n): # Loop n times
power *= x # Multiply power by x
print("The power of",x,"to the",n,"is",power) # Print the result
To embed this project on your website, copy the following code and paste it into your website's HTML: