Address Book I

As you write larger programs, you will most likely want to store data permanently so that the user has access to it the next time the program is run. If you missed the lesson, or would like to refresh your memory as to how file handling works in Python, you might want to look at these two links:

Your Task

Your task is to write a program that will ask the user for names and phone numbers, and then store them in a file. This will form the first part of an address book program that we will complete next week. Your program should:

  1. ask for a name and phone number, and be clear which is which (you can add extra detail if you like, such as addresses, birthdays, etc.)
  2. allow the user to add more than one set of contact details in one go without having to re-run the program
  3. store the names and phone numbers in a file on your computer.

Don't worry about reading the names and numbers back from the file - we'll add that next week.