继续获取此 Python 代码的 SyntaxError
Keep Getting SyntaxError for this Python code
请帮我解决这个问题。不知道怎么回事
print("Welcome to the rollercoaster!")
height = int(input("What is your height in cm? "))
if height > 120:
print("You can ride the rollercoaster!")
age = int(input("What is your age?")
if age <= 18:
print("Please pay .")
else:
print("Please pay .")
else:
print("You are too short for the ride! Grow taller, kid!")
我不断收到此错误:
File "main.py", line 9
if age <= 18:
^
SyntaxError: invalid syntax
我认为您在第 8 行缺少 ')'。
print("Welcome to the rollercoaster!")
height = int(input("What is your height in cm? "))
if height > 120:
print("You can ride the rollercoaster!")
age = int(input("What is your age?")) # <<< Missing ')'
if age <= 18:
print("Please pay .")
else:
print("Please pay .")
else:
print("You are too short for the ride! Grow taller, kid!")
请帮我解决这个问题。不知道怎么回事
print("Welcome to the rollercoaster!")
height = int(input("What is your height in cm? "))
if height > 120:
print("You can ride the rollercoaster!")
age = int(input("What is your age?")
if age <= 18:
print("Please pay .")
else:
print("Please pay .")
else:
print("You are too short for the ride! Grow taller, kid!")
我不断收到此错误:
File "main.py", line 9
if age <= 18:
^
SyntaxError: invalid syntax
我认为您在第 8 行缺少 ')'。
print("Welcome to the rollercoaster!")
height = int(input("What is your height in cm? "))
if height > 120:
print("You can ride the rollercoaster!")
age = int(input("What is your age?")) # <<< Missing ')'
if age <= 18:
print("Please pay .")
else:
print("Please pay .")
else:
print("You are too short for the ride! Grow taller, kid!")