Website Summary Files Commits Branches @commit @diff @stats
path: root / homework / 81350 / parser / colapser / input.file
blob: 223392dd058e2dd2de9270a190083b4e7a7a75db (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
def func():
  num = 7

  factorial = 1

  if num < 0:
     print("Sorry, factorial does not exist for negative numbers")
  elif num == 0:
     print("The factorial of 0 is 1")
  else:
     for i in range(1,num + 1):
         factorial = factorial*i
     print("The factorial of",num,"is",factorial)