Ask coding questions

← Back to all posts
What error did i make?(begginer error)
EvanStewart2

This is my code so far:

name = input("Type your name")
print("Welcome", name, "to this adventure!")

answer = input ("You wake up, and are laying on a bed.(get up/stay asleep")

if answer == "get up"

elif answer == "stay asleep"

else:
print("You stayed asleep and had no adventure, and lost.")

It said the “get up” was a syntax error, what did i do wrong?

Voters
EvanStewart2
Comments
hotnewtop
Spacecraft

You're missing a few : after your IF statements. Also, you can't have an IF or ELIF statement with nothing following it:

EvanStewart2
codingMASTER398

You need to add a : afterwards.
I'd recommend looking this up before adding a post about it.