#Robert Nool III #Ticket Revenue Calculator #Start a = input() b = input() c = input() while a > 300: a = input() print 'WARNING: Invalid input for Section A. Please check data' while b > 500: print 'WARNING: Invalid input for Section B. Please check data' b = input() while c > 200: c = input() print 'WARNING: Invalid input for Section C. Please check data' ticketsA = a * 20 ticketsB = b * 15 ticketsC = c * 10 totalRevenue = ticketsA + ticketsB + ticketsC print 'Total Sale Revenue for all Tickets sold is ${:,.2f}'. format(totalRevenue) print 'Tickets Sold breakdown:' print 'Tickets Sold for Section A Seats: {}'. format(a) print 'Tickets Sold for Section B Seats: {}'. format(b) print 'Tickets Sold for Section C Seats: {}'. format(c)
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