Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program that defines the following two lists: names = [ ' Alice ' , 'Bob', 'Cathy', 'Dan', ' Ed ' , 'Frank','Gary', 'Helen',
Write a program that defines the following two lists:
names Alice 'Bob', 'Cathy', 'Dan', Ed 'Frank','Gary', 'Helen', 'Irene', 'Jack', 'Kelly', 'Larry' ages
These lists match up so Alices age is Bobs age is and so on Write a program that asks the user to input the number of the person to retrieve the corresponding data from the lists. For example, if the user inputs this means the first person whose data is stored in index of these lists whos in this case Alice Then, your program should combine the chosen persons data from these two lists into a dictionary. Then, print the created dictionary. If is the entered input, the output should be:
name: Cathyage:
Hint:
Recall that the function input can retrieve a keyboard input from a user. The signature of this function is as follows:
userinputvalue inputYour message to the user"
NB: userinputvalue is of type String
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