Today We Did
a. Create list called hidden_name
b. Fill the hidden_name list with _’s right underneath the new hidden_name variable with this code:
for i in range(len(name)):
hiddenName.append(“_”)
c. Inside the while loop, inside the “else” (when letter guessed by user is inside “name”), delete “current_guess = letter” and write code that does the following.
Loop through every index in “name” with this code:
for i in range(len(name)):
If the letter the user guessed (the variable named letter) is equal to the current letter in the name (name[i]), write:
hidden_name[i] = letter
d. Inside display_hidden_name() function, delete all previous code. Instead, loop through every letter in hidden_name list and print every letter with:
print(letter, end=” “)