Python练习3->阶乘

1 def fact(n):
2     if n==1:
3         return 1
4     return n*fact(n-1)
5 
6 n=int(raw_input("Please Input The Number of N:  "))
7 print fact(n)

 

posted @ 2015-05-30 12:06  Curious-Python  阅读(134)  评论(0)    收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示