我检查了30多次,我不知道字符串有什么问题。它一定是我看不到的小事。EOL在扫描字符串文字时,文件将不会运行
#Description
print("Costs of EMS responses")
Print("Choose the costs of providing Emergency Medical Services \
+ \n to your region. Remember, half will be covered by insurance \
+ \n of the patient then the rest will have to be paid out of pocket \
+ \n by the patient himself/herself.
")
#Variables
als = int(input("Advanced Life Support: "))
bls = int(input("Basic Life Support: "))
fireresponse = int(input("Fire Response: "))
aeromedical = int(input("EMS Helicopter: "))
citypolice = int(input("City Police: "))
statepolice = int(input("State Police: "))
countypolice = int(input("County Police: "))
swat = int(input("SWAT Team: "))
total = als + bls + fireresponse + aeromedical + citypolice + statepolice + countypolice + swat
print("\nCombined amount of costs from services in the region: ", total)
input("\n\n\nPress enter to exit menu)
线5:为什么印刷资本P? – chucksys 2014-08-31 23:03:53
而不是丑陋的线延续,考虑多线字符串和'textwrap.dedent'(请参阅,例如http://codereview.stackexchange.com/a/60369/32391)。 – jonrsharpe 2014-08-31 23:10:04