#Chapter7_Exercise2_Saima x = raw_input() y = raw_input() z= raw_input() secAseat = int(x) secBseat = int(y) secCseat = int(z) print ("You entered section A seats: " + x) print ("You entered section B seats: " + y) print ("You entered section C seats: " + z) if secAseat > 300: print ("You entered more than the number of seats available in section A. Plz enter the seat number less than or equal to 300") elif secBseat > 500: print ("You entered more than the number of seats available in section B. Plz enter the seat number less than or equal to 500") elif secCseat > 200: print ("You entered more than the number of seats available in section C. Plz enter the seat number less than or equal to 200") else: income = (secAseat * 20) + (secBseat * 15) + (secCseat * 10) print ("Total income generated from ticket sales : " + str(income))
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