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 color_data. Output "Noa's favorite color: " followed by the n-th element of color_data.
Click here for example
Ex: If the input is:
6
cornsilk chartreuse silver turquoise purple firebrick salmon magenta
then the 6th element is 'firebrick'. Thus, the output is:
Noa's favorite color: firebrick
Note: Assume n will always be between 1 and 8, inclusive.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!