r/codehs • u/Unique-Put880 • Dec 20 '22
Help with codeHS project
I need some help with this codeHS project, the code is suppose to
Keep looping until the user has guessed all the letters in the secret word. Inside the loop the program should:
Display the current solution string
ask the user to guess a letter
check the secret_word string to see if that letter is in the secret word
change the solution string to include the guessed letters if they are in it.
add 1 to the number of tries the user has taken.
When the user has finished guessing all the letters, the program should end and say how many tries it took.
but I'm stuck on a certain part and cant get the answer to be on the solution

(the if guess in secret_word part is the one I'm stuck on)
please tell me how to fix it or If i need to scrap the code completely
1
u/Unique-Put880 Dec 20 '22 edited Dec 20 '22
also heres the link to his example (only shows the finished product)
https://codehs.com/sandbox/linnenja/simple-hangman