loading
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
def recursiveExp(base, exponent):
  if base < 2 or exponent == 1:
    return base
  elif exponent == 0:
    return 1
  else:
    return base * recursiveExp(base, exponent - 1)

print(recursiveExp(0,0))
print(recursiveExp(5,0))
print(recursiveExp(2,3))
print(recursiveExp(4,2))
print(recursiveExp(1,5))