Answer the question
In order to leave comments, you need to log in
Syntax error in the condition, what's wrong here?
else answer.upper() != password:
SyntaxError: invalid syntax
text = 'qwq'
answer = input ("password" + " ")
if answer.upper() == text:
print("yes")
else answer.upper() != text:
print("неверный пароль")
Answer the question
In order to leave comments, you need to log in
After else you have a condition, replace else with elif.
Valid code:
text = 'qwq'
answer = input ("password" + " ")
if answer.upper() == text:
print("yes")
elif answer.upper() != text:
print("неверный пароль")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question