Question: Integer n is read from input. Then, eight strings are read from input and stored in the list color _ data. Output Noa's favorite color:
Integer n is read from input. Then, eight strings are read from input and stored in the list colordata. Output "Noa's favorite color: followed by the nth element of colordata.
Click here for example
Ex: If the input is:
cornsilk chartreuse silver turquoise purple firebrick salmon magenta
then the th element is 'firebrick'. Thus, the output is:
Noa's favorite color: firebrick
Note: Assume n will always be between and inclusive.
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
