Question: python code to output the sample runs below Write a program that does the following: - Prompts the user if they served in the armed

python code to output the sample runs below
 python code to output the sample runs below Write a program
that does the following: - Prompts the user if they served in

Write a program that does the following: - Prompts the user if they served in the armed forces - expected answers are y or n - If the user is a member of the armed forces, prompt them for which branch (see list below) and print the slogan fo that branch. Assumptions - Acceptable responses for the first input are n or y - the user should be re-prompted until correct data is provided. - The second prompt will always have a correct response. - You may only use constructs that have been presented so far in this course - You are not allowed to have a print statement in your If statement. - You may not use a list or dictionary. - Your print statements can only contain string literals and variables. Sample Run 01 Did you serve in the armed forces? (y) : y Which branch did you serve: Air Force Aim High Program is done. Sample Run 02 Did you serve in the armed forces? (y):n Program is done Sample Run 03 Did you serve in the armed forces? (y):I did serve That is an incorrect response. Did you serve in the armed forces? (y):n Program is done

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!