我写了几个定义,我希望用户选择要运行的定义,但定义总是打印如何打开和定义?如果用户选择 2,则不应打印。我错过了什么?
Senerio = 0
while Senerio not in (1, 2, 3, 4):
Senerio = int(input("choose a commission/Aggregation senerio number \n"
"1. put in car \n"
"2. put in plane \n"
"3. put on boat \n"
"4. put on fire "))
if Senerio == 1:
Car = 1
Plane = 0
boat = 0
fire = 0
def incar():
print('Im putting this in a car')
incar()
if car == 1:
incar
慕尼黑8549860
MM们
相关分类