Guest User

Untitled

a guest
Jun 21st, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. def factorial(number):
  2. product = 1
  3.  
  4. for i in range(number):
  5.  
  6. product = product * (i + 1)
  7.  
  8. return product
  9.  
  10. user_input = input("enter a non negative number:")
  11.  
  12. factorial_of_the_number = factorial(user_input)
  13.  
  14. print(factorial_of_user_input)
  15.  
  16. factorial_of_the_number = factorial(user_input)
  17.  
  18. factorial(user_input)
Add Comment
Please, Sign In to add comment