h2oaimichalmarszalek commited on
Commit
852bed0
·
verified ·
1 Parent(s): 3dfe620

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -14,7 +14,11 @@ def factorial(n :int ) -> int:
14
  Args:
15
  n: an int number to calculate factorial
16
  """
17
- return n*factorial(n-1)
 
 
 
 
18
 
19
 
20
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
 
14
  Args:
15
  n: an int number to calculate factorial
16
  """
17
+ res = n
18
+ while n>1:
19
+ res=res*(n-1)
20
+ n=n-1
21
+ return res
22
 
23
 
24
  # Below is an example of a tool that does nothing. Amaze us with your creativity !