Answered step by step
Verified Expert Solution
Question
1 Approved Answer
use python please First, ask the user the following three questions and store the answers in a nested list. - What is your name? -
use python please
First, ask the user the following three questions and store the answers in a nested list. - What is your name? - What is your quest? - What is your favorite color? Store at least 6 sets of responses. Example nested list: [ ['Sir Robin' , 'to find the Holy Grail' , 'red'] , ['Matt' , 'to travel the world' , 'blue'], etc...] Second, sort the list alphabetically by color and print out the results. We suggest looking up how to use this module: from operator import itemgetter But any sorting method will work, as long as you can explain it in a comment. Sample output: what is your name? Matt what is your quest? travel the world what is your favorite color? blue what is your name? Dan what is your quest? learn to sail what is your favorite color? purple what is your name? Sir Robin what is your quest? find the Holy Grail what is your favorite color? crimson what is your name? Erika what is your quest? solve the case what is your favorite color? red what is your name? Waldo what is your quest? find the perfect hiding spot what is your favorite color? white Matt is on a quest to travel the world. Favorite color is blue! Sir robin is on a quest to find the Holy Grail. Favorite color is crimson! Dan is on a quest to learn to sail. Favorite color is purple! Sherlock is on a quest to solve the case. Favorite color is red! Waldo is on a quest to find the perfect hiding spot. Favorite color is white! Erika is on a quest to find out where the dang cat went. Favorite color is yellowStep 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