Don`t working condition if-elif on Python, help me.
Must be if you enter the correct username and password (one of the users). Then the corresponding message is displayed. Don`t if currently , then run elif.
login = input("Введите логин: ")
passwd = input("Введите пароль: ")
if login == 'gleb' and passwd == 'gleb2806':
print("Рад видеть Вас администратор Глеб!")
if login == 'kostya' and passwd == 'kostya1':
print("Рад видеть Вас модератор Костантин!")
elif login != 'gleb' and passwd != 'gleb2806' and login != 'kostya' and passwd != 'kostya1':
print("Система Вас не распознала. Повторите попытку ещё раз - это бесплатно!")
Aucun commentaire:
Enregistrer un commentaire