Question: Write a Python program that asks the user for two values: The price of a shirt How many shirts they want to buy Calculate and

Write a Python program that asks the user for two values: The price of a shirt How many shirts they want to buy Calculate and print their overall total after applying the sale. (If they buy 2 shirts, the first is full price and the second is half price. If they buy 3 shirts, the first is full price, the second is half price, but the third is full price they don't get to use the sale again because they didn't buy a fourth shirt. If they buy 4 shirts, two of them will be full price and two of them will be half price.) Your program should work correctly for any (positive) number of shirts. You should use conversion specifiers to round the final cost to two decimal places. Here is one example of how the program should look when it runs (user input is in red): Enter the original cost of a shirt: $15.00 Enter how many shirts you want to buy: 3 Final cost: $37.50 Here is a second example of how the program should look when it runs (user input is in red): Enter the original cost of a shirt: $15.50 Enter how many shirts you want to buy: 4 Final cost: $46.50
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
