views:

80

answers:

2

Beginner programmer here! I need to write a simple phone book application. My program should be able to add names and phone numbers to a database. I should use a dictionary to store the information. If the user's input is empty, my program should stop, otherwise it should keep on asking inputs.

Honestly I am lost here. I need help.

+2  A: 

Take a look at How to think like a computer scientist. It is all about python and computer science. A great started/primer on python.

After you have learned some python, you next need to look at the specific phone in question and look for details on that phone.

Chris
It seems like the problems is a homework question to create a phone-book-like CLI program to take interactive input and store the data, not about any real tangible phone.
erjiang
I don't think this program is intended to run on an actual *phone*. It's classic homework material.
ire_and_curses
It even has the `homework` tag. =)
Ashish
true this is about a homework. kinda stuck here.
John
+1  A: 

There are several ways to declare a dictionary in Python. And Python is almost English. So it shouldn't be difficult. I would second Chris's recommendation (although I've not had the chance to read that book myself).

Things you may need:

  1. http://docs.python.org/tutorial/datastructures.html#dictionaries
  2. http://docs.python.org/reference/compound_stmts.html#while
  3. http://docs.python.org/tutorial/inputoutput.html
  4. Taking homework more seriously(?)
Ashish