Advertisement
pacho_the_python

Untitled

Feb 10th, 2022
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. def factorial(num):
  2. result = num
  3. if num == 0:
  4. result = 1
  5. else:
  6. for num in range(num - 1, 0, -1):
  7. result = result * num
  8.  
  9. return result
  10.  
  11.  
  12. num1 = int(input())
  13. num2 = int(input())
  14.  
  15. division = factorial(num1) / factorial(num2)
  16.  
  17. print(f"{division:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement