Asked by Anonymous
                Write 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. Your program should use a loop to ask the user how many orders they need to process and continue processing orders as long as the number of orders is greater than 0.
            
            
        Answers
                    Answered by
            helper
            
    #!/usr/bin/python3
def main():
packages = int(input('Enter the number of packages you would like to order: '))
if packages <= 19 and packages >= 10:
discount(packages, .2)
elif packages <= 49 and packages >= 20:
discount(packages, .3)
elif packages <= 99 and packages >= 50:
discount(packages, .4)
else:
discount(packages, .5)
def discount(value, x):
print('You receive a %d discount' % x)
total = reg * value * x
print('$', total)
reg = 99
main()
not finished just to give you right idea
    
def main():
packages = int(input('Enter the number of packages you would like to order: '))
if packages <= 19 and packages >= 10:
discount(packages, .2)
elif packages <= 49 and packages >= 20:
discount(packages, .3)
elif packages <= 99 and packages >= 50:
discount(packages, .4)
else:
discount(packages, .5)
def discount(value, x):
print('You receive a %d discount' % x)
total = reg * value * x
print('$', total)
reg = 99
main()
not finished just to give you right idea
                                                    There are no AI answers yet. The ability to request AI answers is coming soon!
                                            
                Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.