0

What’s wrong with this code?

letter = input(“write a letter: ”). lower() While letter != “m” or letter != “i”: print(“Choose “m” or “i”) letter = input(“write a letter: ”). lower() Even though I input “m” or “i” the code enters the loop!

19th Jul 2021, 11:41 AM
Farzam Khonamri
2 Respuestas
+ 1
letter = "niiii" while letter not in ["m","i"]: letter = input("only m or i: ") print(letter)
19th Jul 2021, 12:34 PM
Shadoff
Shadoff - avatar
0
Actually solved it with a “while True” loop.
20th Jul 2021, 6:54 AM
Farzam Khonamri