## Exercise 4 Aaron Schaffer ## item1 = input("What's the price of the first item?") item2 = input("What's the price of the second item?") item3 = input("What's the price of the third item?") item4 = input("What's the price of the fourth item?") item5 = input("What's the price of the last item?") salesTax = 0.06 subTotal = item1+item2+item3+item4+item5 print("Your subtotal is ") print subTotal print("The sales tax is 6%") taxTotal = subTotal*salesTax print("your total tax is ") print taxTotal grandTotal = subTotal+taxTotal print("your grand total is ") print grandTotal
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