Initial commit: Python learning project with examples and exercises
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
#5.6.1
|
||||
def f(n):
|
||||
if n==0:
|
||||
return 1
|
||||
elif n>0:
|
||||
return n*f(n-1)
|
||||
else:
|
||||
return "输入错误"
|
||||
|
||||
a = int(input())
|
||||
print(f(a))
|
||||
Reference in New Issue
Block a user