入場料を計算するプログラムを作ろうとしています。大人2人と子供3人の場合、15ドルの費用がかかる部分を除いて、なんとかできました。これはifステートメントを使用して実行する必要がありますか?どのように実行しますか?
import math
loop = 1
choice = 0
while loop == 1:
print "Welcome"
print "What would you like to do?:"
print " "
print "1) Calculate entrance cost"
print "2) Leave swimming centre"
print " "
choice = int(raw_input("Choose your option: ").strip())
if choice == 1:
add1 = input("Adults: ")
add2 = input("Concessions: ")
add3 = input("Children: ")
print add1, "+", add2, "+", add3, "answer=", add1 *5 + add2 *3 + add3 *2
elif choice == 2:
loop = 0
よろしくお願いします!!