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.
Red green blue purple.
Reverse the list use this reversed list for the following steps
Use a for loop to iterate through the colors and print out the elements.
Print out the fourth letter p from purple using a nested list.
Create a variable called x and set it equal to
Create a while loop that states while x is less than the size of the list print out
the color.
Be sure to increase the value of x as you iterate through your while loop! Hint:
xx Show the output
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
