#Melissa Hensley #CIS 122 #Chapter 4 Exercise 7 #Software Sales packages = int(input('Enter the number of packages you would like to order: ')) print packages price = 99 if packages <= 19 and packages >= 10: print ('You receive a twenty percent discount. ') print packages * price * 0.80 elif packages <= 49 and packages >= 20: print('You receive a thirty percent discount. ') print packages * price * 0.70 elif packages <= 99 and packages >=50: print('You recieve a forty percent discount. ') print packages * price * 0.60 elif packages >= 100: print('You receive a fifty percent discount. ') print packages * price * 0.50 else: print('This quantity does not qualify for a discount.') print('Your total is: ') print packages * price
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question