# Assignment 6 exercise 2 # Display sales from theatrer seat sales # Cory Parker 5/5/15 SA = input('How many seats were sold in Section A?: ') print (SA) SB = input('How many seats were sold in Section B?: ') print (SB) SC = input('How many seats were sold in Section C?: ') print (SC) SA_cost = 20 SB_cost = 15 SC_cost = 10 gross_rev = (SA*SA_cost)+(SB+SB_cost)+(SC+SC_cost) while SA > 300 or SA < 0: SA = input("Input a value from 0 to 300. Try again: ") print(SA) while SB > 500 or SA < 0: SB = input("Input a value from 0 to 500. Try again: ") print(SA) while SC > 200 or SA < 0: SC = input("Input a value from 0 to 200. Try again: ") print(SA) print("Ticket revunes were", gross_rev)
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