Python / 1AS.py
Madhan-Alagarsamy's picture
Upload 1AS.py
bbb3d78 verified
raw
history blame contribute delete
234 Bytes
def power(x, n):
if n == 0:
return 1
else:
return x * power(x, n - 1)
x = int(input("Enter the base value x: "))
n = int(input("Enter the exponential value n: "))
r = power(x, n)
print("Result:", r)