input: from typing import List
  
  def factorial(num: int) -> int:
      """Calculate the factorial of a given number.
      >>> factorial(5)
      120
      >>> factorial(0)
      1
      """
      if num == 0 or num == 1:
          return 1
      else:
          return num * factorial(num - 1)
  
  n = int(input("Enter a number: "))  
  print("Factorial of",n,"is",factorial(n))
output:     if num == 0 or num == 1:
          return 1
      else:
          return num * factorial(num - 1)