code: def how_old(dob):
      
      today = datetime.date.today()
      return today.year - dob.year - ((today.month, today.day) < (dob.month, dob.day))
docs: Calculate the age
      :param dob: datetime object
      :return: int