old_contents: # This program makes a birthday database
  
  birthdays = {'Alice': 'Apr 1', 'Bob': 'Dec 12', 'Carol': 'Mar 4'}
  
  while True:
      print('Enter a name: (blank to quit)')
      name = input()
      if name == '':
          break
  
      if name in birthdays:
          print(birthdays[name] + ' is the birthday of ' + name)
      else:
          print('I do not have birthday information for ' + name)
          print('What is their birthday?')
          bday = input()
          birthdays[name] = bday
          print('Birthday database updated.')
  
new_contents: """Birthdays
  
  This program makes a birthday database using a :obj:`dict`.
  
  """
  
  
  def main():
      birthdays = {'Alice': 'Apr 1', 'Bob': 'Dec 12', 'Carol': 'Mar 4'}
      """dict: Birthdays with first name as keys and `month day` as values."""
  
      while True:
          print('Enter a name: (blank to quit)')
          name = input()
          if name == '':
              break
  
          if name in birthdays:
              print(birthdays[name] + ' is the birthday of ' + name)
          else:
              print('I do not have birthday information for ' + name)
              print('What is their birthday?')
              bday = input()
              birthdays[name] = bday
              print('Birthday database updated.')
  
  
  if __name__ == '__main__':
      main()
  
subject: Update P01_birthdays.py added docstrings and wrapped in main() function