0
What's wrong with the code?
Incorrect is displayed even when the input is part of the word. I also get an EOFError at line 22. Also, how do I continue the game without having it reset (on the enter-input prompt from the compiler, I can enter whatever, but when I close it it resets the word; I assume this simply has to do with how it's set up and me needing to code it someplace else)? I'm a big noob, both to Python and SoloLearn, so sorry 😅 https://code.sololearn.com/cNH1xr8r76Y7/?ref=app
5 Respostas
+ 3
Hey so i played it in pydroid!
I just typed in the whole alphabet as my first guess and won... are you doing sort of like a hangman game?
Dea Mer also sololearn has to take all input at once. Not the best for interactive programs... pydroid is a good alternative to run your more interactive code
+ 2
Dea Mer your code looks ok, i think is an input issue with sololearn
0
Ohhh. Thanks so much! :) One question: how would I get Incorrect to print ONLY when the entered input is incorrect?
0
secret_word = "awesome"
guess = input("Guess a word: ")
if guess == secret_word:
print("Got it!")
else:
print("Nope!")
0
Woo! Got it all fixed. Thanks so much :)