« All Events
2 PM – Intro To Python – Gamas
September 11, 2021 @ 2:00 pm - 3:00 pm
Today We Do
- We continued on Hangman game. We learned on how to loop through each letter at a time in Sep11_LoopingEachLetterInAWord.py. The latest code is uploaded into the google drive already.
Homework
- Inside Sep11_LoopingEachLetterInAWord.py create a new variable “clues” and this should be a List of 6 question marks.
- Try your best, Inside the for loop that loops every letter of the “secret_word“, change the code so when secret_word[index] == user_input, it will update one of the element inside “clues” list with the “user_input”.
- After the for loop, print the “clues” variable.
- If you do things properly, it will do the following output
-
d
r - replace the ?
a
g
o
n
['?', 'r', '?', '?', '?', '?']