0
Hi everyone, I can't seem to find where I got it wrong. The elif statement is not recognised in my code. Please I need help.
answer = input("\nWhat is the capital of Nigeria? \n>>>") if answer == "Abuja" or "abuja" or "ABUJA" : print(answer, "is correct ā ") elif answer!= "Abuja" or "abuja" or "ABUJA" : print(answer, "is a wrong answer ā ")
6 Answers
+ 6
u donāt need elif in this case just use else
answer = input()
if answer.lower() == "abuja":
print(answer, "is correct ā
")
else:
print(answer, "is a wrong answer ā ")
+ 2
if answer == "Abuja" or answer == "abuja " or answer == "ABUJA" :
print()
else:
print()
you don't need to use elif.
else is enough in your case.
+ 1
[BusyTheseDays] thanks alot šš¼ your answer was helpful ā
š¾
+ 1
Bahhaš§ thanks šš¼ā
š¾
0
ubai thanks alot šš¼ your answer was helpful ā
š¾
I never knew how to use the .lower() module but now it's good to know it's useful.