#3 lol

Open
ylmcc wants to merge 3 commits from ylmcc/git-tutorial:master into master
  1. +1
    -0
      .gitignore
  2. +15
    -0
      factorial.py

+ 1
- 0
.gitignore View File

@@ -0,0 +1 @@
*.class

+ 15
- 0
factorial.py View File

@@ -0,0 +1,15 @@
def factorial(n):
if n == 0:
return 1
else:
return n * factorial(n-1)

def main():
num = input()
total = factorial(int(num))
print (total)

if __name__== '__main__':
main()



Loading…
Cancel
Save