Question: Q 4 . Write a program that defines the following two lists: names = [ ' Alice ' , 'Bob', 'Cathy', 'Dan', ' Ed '
Q 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 Alice's age is Bob's 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 person's data from these two lists into a dictionary. Then, print the created dictionary. If is the entered input, the output should be:
name: Cathy "age":
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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
