Skip to content

Instantly share code, notes, and snippets.

@jaredpar
Forked from anonymous/gist:93c5c2b26c252471a480
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save jaredpar/b814a2fa081fa6d76f68 to your computer and use it in GitHub Desktop.

Select an option

Save jaredpar/b814a2fa081fa6d76f68 to your computer and use it in GitHub Desktop.

Revisions

  1. @invalid-email-address Anonymous created this gist Sep 30, 2014.
    28 changes: 28 additions & 0 deletions gistfile1.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    def main():

    #Declare
    price = 99

    quantity = float(input("How many packages have you purchased?"))


    if quantity >= 10:
    print ("Your discount is 20%.")
    print ("Your total is ", quantity * price - quantity * price * .2)
    else:

    if quantity >= 20:
    print ("Your discount is 30%. ")
    print ("Your total is ", quantity * price - quantity * price *.3)
    else:

    if quantity >= 50:
    print ("Your discount is 40%.")
    print ("Your total is ", quantity * price - quantity * price * .4)
    else:

    if quantity >= 100:
    print ("Your discount is 50%. ")
    print ("Your total is ", quantity * price - quantity * price * .5)

    main()