Skip to content
← Back to Community
len(word)
Profile icon
EmilyYe4

len(word) error. Im creating hangman btw

Voters
Profile icon
EmilyYe4
Comments
hotnewtop
Profile icon
MrVoo

You forgot to concatenate them, replace that line with word_completion = '_' + len(word)

Profile icon
EmilyYe4

ok. but there is new error @MrVoo
line 37
if guess in guessed_words"
^
SyntaxError: EOL while scanning string literal

Profile icon
CosmicBear

@EmilyYe4 it should be if guess in guessed_words: You hit the wrong key.

Profile icon
EmilyYe4
Profile icon
EmilyYe4

File "main.py", line 37
if guess in guessed_words
^
SyntaxError: invalid syntax
@CosmicBear

Profile icon
MrVoo

@EmilyYe4 Still no colon :/

Profile icon
EmilyYe4

oh ok
@MrVoo

Profile icon
EmilyYe4
Profile icon
MrVoo

@EmilyYe4 No offense, but can't you try to debug it yourself? Align the else with the if/elif it corresponds with.

Profile icon
EmilyYe4

ok mate ill ask my dad. I'm kinda the only one in my fam that knows a bit of python tho... @MrVoo

Profile icon
MrVoo

@EmilyYe4 It's not Java, it's Python... Also you do know google exists?

Profile icon
EmilyYe4

oo i am so dum dude
@MrVoo