American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

2 PM – Intro To Python – Sebastian

January 21, 2023 @ 2:00 pm - 3:00 pm

Today We Did

  1. Hangman project
  2. In case you need anything, feel free to email me at sebastian@ayclogic.com
Homework
  1. Name your homework JAN21_hangman_hw, please submit by next Friday.
  2. Homework:

    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=” “)

Details

Date:
January 21, 2023
Time:
2:00 pm - 3:00 pm
Event Categories:
,
Verified by MonsterInsights