Question: Write the source code that corresponds to the pseudocode 3 . THIS MENU DOES HAVE AN EXIT CHOICE Write a program that prompts the user

Write the source code that corresponds to the pseudocode
3. THIS MENU DOES HAVE AN EXIT CHOICE
Write a program that prompts the user for a choice from the following menu:
Please choose a color from the following menu until they choose to exit:
1) Blue
2) Green
3) Red
4) Exit
Input Validation: The user must enter 1,2,3 or 4.
Pseudocode:
Declare variables
String menuChoice
menuChoice =-1
while menuChoice !=4:
Display menu
Please choose a color from the following menu until they choose to exit:
1) Blue
2) Green
3) Red
4) Exit
if menuChoice ==1:
.....
elif menuChoice ==2:
.....
elif menuChoice ==3:
.....
elif menuChoice ==4:
Display Good Bye
else:
Display Invalid

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 Programming Questions!