Ask coding questions

← Back to all posts
Error: Invalid syntax, row 8 !
h
Halvadzhiev (1)

#Game Guess#
print("Game Guess the word starts ")

guesscount=0
number_of_guess=3
out_of_guess=False
secret_word="Giraffes"

while guess!=secretword and not(out_of_guess)
If guess_count
<=number_of_guess:
guess= input("Enter a guess word: ")
number_of_guess+=1

else:
out_of_guess= True
print("You lost the game")

else:
print("You won the game")

Commentshotnewtop
ryanhcode (90)

Hey! It wasn't necessarily a syntax error, because fixing the error many more came up. I redid your code and you can find it here: https://repl.it/@ryanhallihan/Helpin
Let me know if you need any help understanding it!

Halvadzhiev (1)

@ryanhallihan Well thanks Ryan :), I felt that the core conseption was wrong with this while at the begining ....