function_docstring.py 299 B

12345678910111213141516
  1. def print_max(x, y):
  2. '''Prints the maximum of two numbers.
  3. The two values must be integers.'''
  4. # convert to integers, if possible
  5. x = int(x)
  6. y = int(y)
  7. if x > y:
  8. print x, 'is maximum'
  9. else:
  10. print y, 'is maximum'
  11. print_max(3, 5)
  12. print print_max.__doc__