Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

a softare company sells a package that retails for $99. quantity discounts given

ID: 3543306 • Letter: A

Question

a softare company sells a package that retails for $99. quantity discounts given accourding to the followin table.

QUANTITY                                                   DISCOUNT

10-19                                                                     20%

20-49                                                                      30%

50-99                                                                     40%

                                                                                50%

100 OR MORE

Design a program that asks the user to enter the number of packages purchased.the program should then display the amount of the discount(if any)and the total amount of the purchase after the discount

Explanation / Answer

def main():

pur_qnt=input("enter the number of quantity purchased:");

total=int(pur_qnt)*99;

discount=0;

pur=int(pur_qnt);

if pur>=100:

discount=total/2;

elif pur>=50:

discount=total*4/10;

elif pur>=20:

discount=total*3/10;

elif pur>=10:

discount=total*2/10;

else:

discount=0;

s='the discount amount is : ';

s1=' the amount after discount : ';

print(s,discount,s1,total-discount);

  


main();