Question: Write a python program that asks the user to enter the first name of the person they want to look up(fix it if they enter

Write a python program that asks the user to enter the first name of the person they want to look up(fix it if they enter lower case) if they don't put anything and just press enter they will access a directory, then will be asked to enter the first letter of a name they're looking for. This will return a list of any names in the directory that start with the letter, as well as return them to the first question.

Also if they hit enter in the directory without any input they go back to the original name input and if they enter anything other then a single character or not a letter they get corrected and sent back to directory input(not the first option)

If the name isnt found tell the user (use .get for this). Otherwise print a sentence like Xs favorite color is purple and his favorite number 5"

After printing out the favorites of the located person: Print a line saying something like Press enter for general stats about favorites

With headers and nice centering print out a unique list of favorite colors and how often each was picked With headers and nice centering print out a unique list of favorite number and how often each was picked

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!