Question: PYTHON PROGRAMMING ONLY PLEASE 1. This application will ask the number of shirts for each size that you have. The user will enter one number,

PYTHON PROGRAMMING ONLY PLEASE

1. This application will ask the number of shirts for each size that you have. The user will enter one number, so if they enter 6, that means you start with 6 small, 6 medium, and size large shirts. The number entered must be an integer number. If it is not an integer number, print an error message and exit the program.

2. Start a loop and to ask each person how many shirts that they want and the size (S, M, or L). A person must enter a positive integer number. If the entry is not valid, print an error message and just ask for the number again. If the size is not correct, keep asking until you get a valid size.

3. Keep track of and print out the number of shorts remaining.

4. If you dont have enough shirts in that size, print a message that says Not enough shirts!

5. Keep going until you run out of all shirts and the program can stop.

PYTHON PROGRAMMING ONLY PLEASE 1. This application will ask the number of

shirts for each size that you have. The user will enter one

Sample Execution (User Inputs are in Bold Italics): Please enter the number of shirts available: 10 Please enter the number of shirts:-1 Invalid Number! Please enter the number of shirts: 4 Please enter the size: Q Shirts can only be S, M, or L Please enter the size: L We have (6) L, (10) M, and (10) S shirts left. Please enter the number of shirts: 8 Please enter the size: L Not enough shirts! We have (6) L, (10) M, and (10) S shirts left. Please enter the number of shirts: c Invalid Number! Please enter the number of shirts: 6 Please enter the size: L We have (0) L, (10) M, and (10) S shirts left. Please enter the number of shirts: 10 Please enter the size: M We have (0) L, (0) M, and (10) S shirts left. Please enter the number of shirts: 10 Please enter the size: S We have (0) L, (10) M, and (0) S shirts left. Please enter the size: L We have (0) L, (10) M, and (10) S shirts left. Please enter the number of shirts: 10 Please enter the size: M We have (0) L, (0) M, and (10) S shirts left. Please enter the number of shirts: 10 Please enter the size: S We have (0) L, (10) M, and (0) S shirts left

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!