Elif给出了无效的语法python?

-1 python

这是我一直在使用的代码,但它没有工作,因为它说elif语句是无效的语法.任何人都可以帮助我,因为我是python的初学者.

age = int(input('How old are you?: '))
if age <= 16:
    print ('You are too young to enter this section of the program!')
else:
    age >= 16
    print ('Welcome to the advanced section of the program!')

elif: password = int(input('please enter the password to enter the elite members section: ')):
    if password == ('muffin'):
        print ('Well done for unlocking the secret part of the program')
    else:
            print ('You shall not pass!')
Run Code Online (Sandbox Code Playgroud)

Jor*_*ley 6

elif需要一个状态(即elif 7 > 5:....)也是一个elif不能跟随的else必须遵循一个ifelif条件

在你的情况下,你elif没有条件,所以python不知道该怎么做

elif也跟着你else我不确定你真正期望它做什么...