Question: Generate a list containing the following colors. 2 ) Red green blue purple. 3 ) Reverse the list use this reversed list for the following

Generate a list containing the following colors.
2) Red green blue purple.
3) Reverse the list use this reversed list for the following steps 4-8.
4) Use a for loop to iterate through the colors and print out the elements.
5) Print out the fourth letter p from purple using a nested list.
6) Create a variable called x and set it equal to 0.
7) Create a while loop that states while x is less than the size of the list-2, print out
the color.
8) Be sure to increase the value of x as you iterate through your while loop! (Hint:
x=x+1)

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!