Write a program that stores the names and phone numbers. The program should have a menu which includes following options for the contacts.
- add
- edit
- delete
Start with an empty dictionary in order to store names and phone numbers as pairs.
Program should take the names and phone numbers with the input() function.
Be sure that names have only letters(Uppercase or lowercase). No numbers.. No characters or any other thing.. Just letters.. Program should ask for a new input if the input is not valid.
Phone numbers must have 10 digits. Otherwise the program should not accept the input and should ask the user to enter the number again.
There must not be a name twice in the list. If a person has two or more phone numbers, then the program should store them for the same name. (So you must use lists somewhere.)
While taking input, ask user whether the contact is important or not. If the input is important, store them both in the dictionary and another place where we can be sure of the security of the input. So we do not lose these important contacts forever. (you know what I mean.:))
- https://www.hackerrank.com/challenges/list-comprehensions/problem
- https://www.hackerrank.com/challenges/python-tuples/problem
- https://www.hackerrank.com/challenges/nested-list/problem (edited) .
Good luck!