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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started