American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

2 PM – Intro To Python – Gamas

August 21, 2021 @ 2:00 pm - 3:00 pm

Today We Do
  1. We finished Magic 8 Ball version 1 using random.randint
  2. We finished Magic 8 Ball version 2 using random.choice
  3. We started HangMan game.
Homework
  1. Continued with the HangMan game. Create a forever loop that will continuously doing the following
  2. Print the 9 hearts symbols
  3. Ask input from Shell “Guess a letter or the whole word: “
  4. Add an if statement that would check if the user input is equal to secret_word variable. If they are the same, break from the loop and print “Congratulation, you won the game”.
  5. It should look like this
  6. >>> %Run Aug21_HangmanGame.py
    ogre
    
    ❤❤❤❤❤❤❤❤❤
    Guess a letter or the whole word: a
    
    ❤❤❤❤❤❤❤❤❤
    Guess a letter or the whole word: d
    
    ❤❤❤❤❤❤❤❤❤
    Guess a letter or the whole word: dragon
    
    ❤❤❤❤❤❤❤❤❤
    Guess a letter or the whole word: ogre
    Congratulation you have won the game.
    >>>

Details

Date:
August 21, 2021
Time:
2:00 pm - 3:00 pm
Event Categories:
,
Verified by MonsterInsights