Data science workflow repository to explore and guide you through the data science task using command line tools.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
218 B

  1. ##!/usr/bin/env python3
  2. def factorial(x):
  3. result = 1
  4. for i in range(2, x + 1):
  5. result *= i
  6. return result
  7. if __name__ == "__main__":
  8. import sys
  9. x = int(sys.argv[1])
  10. print(factorial(x))