A software company sells a package that retails for $99. Quantity discounts are given according to the following table. Quantity Discount 10 - 19 20% 20 - 49 30% 50 - 69 35% 70 – 99 40% 100 or more 50% Write a program that asks for the number of units sold and computes the total cost of the purchase and the savings due to the discount applied. The program should also display the number of units purchased and the discount in percentage. The output should include the following text: Number of units purchased is: Discount applied is: Total savings due to discount is: The total cost of the purchase is: Do NOT use any logical operator in the program. Run your program three times with 5, 59, and 110 as the user input for the number of units purchased.
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
###Python Program-related question. So need the answer in python expressions.
COSC 1336 –
Program 5 – Decision Structures
A software company sells a package that retails for $99. Quantity discounts are given according to the following table.
Quantity Discount
10 - 19 20%
20 - 49 30%
50 - 69 35%
70 – 99 40%
100 or more 50%
Write a program that asks for the number of units sold and computes the total cost of the purchase and the savings due to the discount applied. The program should also display the number of units purchased and the discount in percentage. The output should include the following text:
Number of units purchased is:
Discount applied is:
Total savings due to discount is:
The total cost of the purchase is:
Do NOT use any logical operator in the program.
Run your program three times with 5, 59, and 110 as the user input for the number of units purchased.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 5 images