old_contents: # This program prints five random numbers
  import random
  for i in range(5):
      print(random.randint(1, 10))
  
new_contents: """Print random
  
  This program prints five random numbers using the :py:mod:`random` module.
  
  """
  
  
  def main():
      import random
      for i in range(5):
          print(random.randint(1, 10))
  
  
  # If P10_printRandom.py is run (instead of imported as a module), call
  # the main() function:
  if __name__ == '__main__':
      main()
  
subject: Update P10_printRandom.py added docstring and wrapped in main() function