print "Laserdome Planner 0.3" print "Do you want to load the Laserdome Planner?" print 'If you do, type "Yes" without the quotes' startup=str(raw_input()) fstartup=len(startup) if fstartup==3: print "Loaded" print "Do you want to use the pre-configured settings or make your own?" print 'If you want to use the pre-configured settings, type "Automatic" or "Auto" without the quotes.' print 'If you want to create your own settings, type "Manual" without the quotes' automanual=str(raw_input()) fautomanual=len(automanual) if fautomanual==9 or fautomanual==4: print "You are using the pre-set costs and settings" print "How many miles (Rounded to the nearest 1) are you away from Laserdome?" miles=int(raw_input()) fmiles=miles*1.95*2 print "How many hours (Rounded to the nearest 1) will you be at Laserdome?" hours=int(raw_input()) fhours=hours*19.29 print "How many people will there be in total?" people=int(raw_input()) fpeople=people*15 if people<=20: nurse=0 else: nurse=20 fnurse=nurse*hours cost=fmiles+fhours+fpeople+fnurse print "This Laserdome trip will cost you:" print cost print "A list of the individual costs..." bus=fmiles+fhours print "Bussing:" print bus print "Admission:" print fpeople if nurse==20: print "Nurse:" print fnurse else: print "You did not bring more than 20 people, so your nurse charge does not apply" if fautomanual==6: print "How much does your bussing company charge you per mile? (Rounded to the nearest 1)" mcostmiles=int(raw_input()) print "How much does your bussing company charge you per hour?" mcosthours=int(raw_input()) print "Do you want to apply a nurse charge?" print 'If you do, type "Yes" without the quotes' print "If you don't, type no" isnurse=str(raw_input()) fisnurse=len(isnurse) if fisnurse==3: print "How much does your nurse cost per hour? (Rounded to the nearest $1)" mcostnurse=int(raw_input()) print "Settings Saved" print "You are using custom costs and settings" print "How many miles (rounded to the nearest 1) away are you from Laserdome?" mmiles=int(raw_input()) fmmiles=mcostmiles*mmiles*2 print "How many hours will you be at Laserdome? (Rounded to the nearest 1)" mhours=int(raw_input()) fmhours=mhours*mcosthours mnurse=mcostnurse*mhours print "How many games of Laser-Tag will you play? ($15 for one 40-minute session)" mgameplay=int(raw_input()) print "How many people will be attending?" mpeople=int(raw_input()) fmpeople=mpeople*15*mgameplay cost=fmmiles+fmhours+mnurse+fmpeople print "The total cost of your Laserdome trip is:" print cost print "A list of individual costs..." mbussing=fmmiles+fmhours print "Bussing:" print mbussing print "Laser-Tag:" print fmpeople print "Nurse costs:" print mnurse if fisnurse==2: print "Settings Saved" print "You are using custom costs and settings" print "How many miles (rounded to the nearest 1) away are you from Laserdome?" mmiles=int(raw_input()) fmmiles=mcostmiles*mmiles*2 print "How many hours will you be at Laserdome? (Rounded to the nearest 1)" mhours=int(raw_input()) fmhours=mhours*mcosthours print "How many games of Laser-Tag will you play? ($15 for one 40-minute session)" mgameplay=int(raw_input()) print "How many people will be attending?" mpeople=int(raw_input()) fmpeople=mpeople*15*mgameplay cost=fmmiles+fmhours+fmpeople print "The total cost of your Laserdome trip is:" print cost print "A list of individual costs..." mbussing=fmmiles+fmhours print "Bussing:" print mbussing print "Laser-Tag:" print fmpeople print "You have disabled nurse costs." else: print "Invalid setting. Restart the program." else: print "Invalid input. Restart the program" else: print "Ok, maybe later. Goodbye"
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