Question
PYTHON PROGRAMMING ONLY PLEASE NEED HELP WITH THIS 1. This application will ask the number of shirts for each size that you have. The user
PYTHON PROGRAMMING ONLY PLEASE
NEED HELP WITH THIS
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.
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started