Question: write the python code that corresponds to each pseudocode. Loop Programs 1 . THIS MENU DOES NOT HAVE AN EXIT CHOICE Write a program that
write the python code that corresponds to each pseudocode. Loop Programs
THIS MENU DOES NOT HAVE AN EXIT CHOICE
Write a program that prompts the user for a choice from the following me:
Did you fill out a financial aid application?
Yes
No
Input Validation: The user must enter a or
Pseudocode:
Declare variables
String financialAid
financialAid
while financialAid and financialAid :
Display menu
Did you fill out a financial aid application?
Yes
No
Prompt for financialAid
if financialAid :
Display Congrats your application is complete!
elif financialAid :
Display You must fill out an application
else:
Display Invalid You must choose or from menu.
Use a while loop to prompt a user for a weight. Validate that the weight is not negative.
Pseudocode:
Declare variables
float weight
weight
while weight :
Prompt for weight
if weight :
Display Invalid Weight must be at least
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:
Blue
Green
Red
Exit
Input Validation: The user must enter or
Pseudocode:
Declare variables
String menuChoice
menuChoice
while menuChoice :
Display menu
Please choose a color from the following menu until they choose to exit:
Blue
Green
Red
Exit
if menuChoice :
elif menuChoice :
elif menuChoice :
elif menuChoice :
Display Good Bye
else:
Display Invalid
Prompt the user for the speed a car is travelling. Use a for loop to create a distance chart for the first hours travelled. Validate that rate is at least
Distance rate time
Sample Output:
Enter the speed of the car mph:
Hours Travelled Distance Travelled miles
Pseudocode:
float rate, distance
rate distance
int hours
hours
rate
while rate :
Prompt for rate
if rate :
Display Invalid. Rate must be at least
Display Chart
Display Hours Travelled Distance Travelled miles
for hours in range:
Calculate distance
distance hours rate
Display hours, t distance
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
