The program I've written does take the number of purchase and prints out the discount. I'm lost on how to return the amount of discount and the total amount of the purchase after the discount. Any help would be much appreciated. Thanks in advance.
# The program will figure out
# software price with a discount
# The input for getting the number of packages
def main():
packages = input('Enter the number of packages you would like to order: ')
# My if, elif, and else for the number of packages.
# and it prints the discounts for the number of packages
# entered in the "packages" input.
if packages <= 19 and packages >= 10:
print 'You receive a twenty percent discount. '
elif packages <= 49 and packages >= 20:
print 'You receive a thirty percent discount. '
elif packages <= 99 and packages >= 50:
print 'You recieve a fourty percent discount. '
else:
print 'You recieve a fifty percent discount. '
main()

New Topic/Question
Reply



MultiQuote





|