input: from typing import List
  
  def factorial(num: int) -> int:
      """ Calculate and return the factorial of a given integer.
      >>> factorial(5)
      120
      >>> factorial(7)
      5040
      """
      if num <= 1:
          return 1
      else:
          return num * factorial(num - 1)
output:     if num <= 1:
          return 1
      else:
          return num * factorial(num - 1)