热门

最新

红包

立Flag

投票

同城

我的

发布
m0_51585322
m0_51585322
5 年前
truem0_51585322

请教一下 阶乘调用
def jiecheng(i):
if i > 1:
return i*jiecheng(i-1)
else:
return 1
print(jiecheng(5))
这个输出结果难道不是120和1吗?太难了

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
还有: if 球8.distance(玩家)<1: s=s+1 球8.hideturtle() 球8.goto(random.randint(-500,500),400) 球8.showturtle() #让球归位并积分 if 球1.ycor()<0:break if 球2.ycor()<0:break if 球3.ycor()<0:break if 球4.ycor()<0:break if 球5.ycor()<0:break if 球6.ycor()<0:break if 球7.ycor()<0:break if 球8.ycor()<0:break #探测没接住的球 print("游戏结束") print("分数",s)
立即登录