Ask coding questions

← Back to all posts
The text in the output window/console is coming out to be omitted and overlapped.
Iamvik98 (1)

run this codea and you'll find the input text is not coming exact as coded in the input function. The 1st few input function worked correctly and displayed exact text but after that they are omitted and overlapped.
Help me through this.

Comments
hotnewtop
QuantumCodes (25)

Instead on the thing @Carnage498 said, its better to do

if answer_in_var.strip().lower() == "swim"

This is better. .strip() removes spaces infront and behind of the input(may be caused by autofill) and .lower() makes the whole text to lowercase. And for your original question, everything works fine. Try again

Carnage498 (58)

Huh it seems to work accordingly to me @Iamvik98 It may be an issue from your side.Also you put the "else" statment after the "elif" that doesn't seem right. Try:
if door == "red" or door == "Red":
print("Burned by fire. 'GAME OVER'")
else door == "blue" or door == "Blue":
print("Eaten by beasts. 'GAME OVER'")
elif:
print("Woo Hoo !! YOU WIN")

Hope it helps ~ @Carnage498

Iamvik98 (1)

i try n write elif first and then lastly put else. I Don't think that's causing any issue ! thanks anyway for writing @Carnage498