简单的elif声明因为'表达预期'而无法工作?

Fit*_*itz -6 python pycharm

我对编码非常陌生,只是获得基本代码的要点.我之前做过if声明,但没有遇到过这个问题,有人可以帮忙吗?

我的代码:

print("Hello User")
myName = input("What is your name?")
print("Hello" + myName)

myAge = input("What is your age?")

if input < 17:
    print("Not quite an adult!")
elif:
    print("So you're an adult!")
Run Code Online (Sandbox Code Playgroud)

https://gyazo.com/15eef7751886747f4ce572641b9398fc

fur*_*ras 5

你需要else:.

elif意味着else if需要表达.

if expression:
    pass
elif expression:
    pass
else:
    pass
Run Code Online (Sandbox Code Playgroud)