American Young Coder Academy – Indo

Loading Events

« All Events

  • This event has passed.

5pm Intro To Python – Bill

October 20, 2021 @ 5:00 pm - 6:00 pm

Today We:
  1. Continued the Hangman Project
  2. Made it so when you guess wrong, you lose a life
  3. Made the life bar update and show the correct number of lives you have
  4. Made it so you lose when you run out of lives and ends the game
  5. Started to review looping through lists and index’s to better understand how to make the guessing list of letters show what the player has guessed
Your HW:
  1. Create a list of integers: [-2,-5,10,20,100]
  2. Continuously ask user “Enter an integer: “
  3. Get the integer input from the shell (Hint: all input from shell comes in as a String)
  4. Loop through the list of integers and check for if the input is in the list
    • If it is, print out “<number> is inside the list
      with index <index>”
  5. Expected result:
    Enter a number: 0
    
    Enter a number:10
    10 is inside the list with index 2
    
    Enter a number: -2
    -2 is inside the list with index 0
  6. Create a list of movies [“Shrek”,”Transformers”, “The Bee Movie”]
  7. Ask the user for their favorite movie
  8. Loop throught hte list of movies and check if that movie is in the list
  9. If it is, print out “<Movie> is inside the list
    with index <index>”
  10. Expected result
    Enter a movie: Mario
    
    Enter a movie: Shrek
    
    Shrek is inside the list with index 0

 

Details

Date:
October 20, 2021
Time:
5:00 pm - 6:00 pm
Verified by MonsterInsights