def function(x,y): if x == 0: return 0 if y == 0: return 1 return function(x,y-1)*x while(1): number = int(input('请输入x的值:')) y = int(input('请输入y的值:')) print('x的y次幂的结果是:') result = function(number,y) print(result)
def function(x,y): if x == 0: return 0 if y == 0: return 1 return function(x,y-1)*x while(1): number = int(input('请输入x的值:')) y = int(input('请输入y的值:')) print('x的y次幂的结果是:') result = function(number,y) print(result)