Question: [PYTHON] Part 1: Create a dictionary diction_1, with the name of a person as key and ID number as the key value. Part 2: Ask

[PYTHON]

Part 1: Create a dictionary diction_1, with the name of a person as key and ID number as the key value.

Part 2: Ask the user to add a new name and corresponding ID number to dictionary_1. user_input= input(Add the name and the ID number). If the user enters Quit the program stops.

Part 3: If the name in Part 2, for example John:1234, already is in the dictionary_1, check the ID that the user sent. If the ID is the same, for example, 1234, then print(person in the dictionary). If the ID of the person in the dictionary is different than the new similar name, then add a 1 to the end of the name, e.g. John1 and let the user know that you changed the name.

Part 4: Create a dictionary, dictionary_2 that for each key name has a list of numbers. The user is asked to give the name and numbers separated by commas. John Smith, 1234, 4352, 23, .. Sort the numbers and place them in a list as the key value. For example, the dictionary will be John Smith: [23, 1234, 4352] . Make sure that for sorting, the string should have been converted to numbers.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!