AHS CODING CLUB

Welcome to AHS Code Club Tuesdays

This page will serve as a go to page for lesson, activites and code

Get in Touch
Click Here to Open Python Interpreter
Badges

How Program Works

  • Computer Selects a Word
  • Computer Displays the Word in Dashes instead of Letters
  • Computer Asks Player to Guess Letter
  • Computer tells player if they guessed right or guessed wrong
  • If they guess right the letter that they guess will be revealed in the word.
  • If they guess wrong their number of chances goes down.
  • They don't lose chances if they guess a letter that they already have guessed.
  • Problems We Need to Solve in Hangman Game. Those we solved already are in Red. Those we have to solve are in Green:

    Correct the Following Lines of Code One at a Time and Get it to Run Without Error.

    Each code snippet has syntax problem.

    Definition of Syntax

    In programming, syntax means the set of rules that define how code must be written and structured so that a computer can understand it.

    Think of it as the grammar and spelling of a programming language.

    Just like English has grammar (e.g., subject + verb + object), programming languages have syntax rules (e.g., where parentheses, colons, or keywords must go).

    Topic If Statements

    if x = 5:
        print(x)
    
    if True:
        print("This is ddafdasfd")
         print("This is fafasfdas")
            
    age = 18
    if age = 18:
        print("You are an adult.")
    
            
    #Trying to add 2 integers
    x = 5
    y = input("Please Enter a number: ")
    print(x + y)
            
    x = 5
    if x > 10:
        print("Big number!")
    else
        print("Small number!")
    
            

    For Loops

    for i in rrange(5): print(i)
    for i in range(5)
        print(i)
            
    numbers = [1, 2, 3, 4]
    for num in numbers:
    print(num * 2)
            

    While Loops

    count = 0
    while count < 5
        print(count)
        count += 1
    
    count = 0
    while count < 3:
        print("Count is:", count)
    

    Variables

    #2 Errors
    1variable = 10
    my variable = 20
    
    print(name)
    name = "Alice"
    
    num1 = 10
    num2 = "20"
    result = num1 + Num2
    print(result)
    #Has 2 errors
    
    name = "Harry"
    print(naMe)
    

    Strings

    print(Hello World)
    
    print "Hello World"
    
    msg = "Hello World
    print(msg)
    
    another_message = 'Python is fun!"
    
    message = 'Hello World!"
    print(message)
    
    word = "Python"
    print(word[6])
    

    Lists

    numbers = [1 2, 3]
    
    
    my_list = [1, 2, 3
    
    my_list = [1, 2, 3}    
    
    fruits = ["apple", "banana", "cherry"]
    print(fruits[3])
    
    numbers = [1, 2, 3]
    numbers.add([4, 5, 6])
    print(numbers)
    
    

    These Codes Have Problem With Logic

    In programming, a logical error is a type of bug that happens when your code runs without crashing, but it doesn’t do what you intended — because there’s a mistake in the logic or reasoning behind the code.

    #Goal determine who is a teenager and who is an adult    
    age = 15
    if age > 18:
        print("You are a teenager.")
    else:
        print("You are an adult.")
    
    #Goal is print average of 2 numbers
    a = 10
    b = 20
    avg = a + b / 2  
    print(avg)
    
    # Goal: print numbers greater than 3
    numbers = [1, 2, 3, 4, 5]
    for n in numbers:
        if n > 3:
            pass
        print(n)  
    
    # Goal: print numbers 1 to 5
    total = 0
    for i in range(1, 5):
        total += i
    print("Sum from 1 to 5 is:", total)
    
    #Goal is print a countdown from 5 to 0
    count = 5
    while count == 0:
        print(count)
        count -= 1
    
    #Goal find total of numbers between 0 and 4
    total = 0
    for i in range(5):
        total = i  # ❌ overwrites total every time
    print(total)
    
    #Goal find the longest word in a list of words
    words = ["apple", "banana", "cherry"]
    longest = ""
    for word in words:
        if len(word) < len(longest):
            longest = word
    print("Longest word is:", longest)
    
    #Goal print if x is between 0 and 10
    if x > 0 or x < 10:  # Logical error: always true
        print("x is between 0 and 10")
    
    i = 0
    while i < 5:
        print(i)
    

    Lesson - While Loop

    What is a While Loop?

    A while loop repeatedly executes a block of code as long as a condition is True.

    It’s useful when you don’t know exactly how many times you need to loop — for example, waiting for user input, or looping until a certain calculation is complete.

    while condition:
        # code to repeat
    

    How it Works?

    Example

    count = 1
    
    while count <= 5:
        print("Count is:", count)
        count += 1  # increase count by 1 each time
    

    Here’s what happens:

    Common Mistake: Infinite Loops

    If your condition never becomes False, the loop runs forever.

    while True:
        print("This will never stop!")  # use Ctrl+C to stop manually
    
    

    To avoid this, make sure something inside the loop changes so the condition will eventually fail.

    Example 2: User Input

    password = ""
    
    while password != "open sesame":
        password = input("Enter the password: ")
    
    print("Access granted!")
    

    How it Works:

    The loop keeps asking until the user types "open sesame".

    Once the condition is false (password != "open sesame" becomes false), it exits.

    Example 3 - Using Break

    You can exit a loop early using break.

    while True:
        num = int(input("Enter a number (0 to quit): "))
        if num == 0:
            break
        print("You entered:", num)
    

    When the user types 0, the break statement immediately ends the loop.

    Example 4: Using continue

    You can skip the rest of a loop iteration using continue.

    n = 0
    
    while n < 10:
        n += 1
        if n % 2 == 0:
            continue  # skip even numbers
        print(n)
    

    This prints only the odd numbers between 1 and 9.

    For Loop

    What is a for Loop

    A for loop lets you repeat an action for each item in a sequence (like a list, range, or string).

    When you use it with a string, it goes through each character one by one.

    for variable in sequence:
        # code to run for each item
    

    Looping Through a String:

    for letter in "hello":
        print(letter)
    

    Change End of a Print Function

    print("Hello")
    print("World")
    
    print(value, end="something")
    
    print("Hello", end=" ")
    print("World")
    
    
    for i in range(5):
        print(i, end=", ")
    
    for letter in "ABC":
        print(letter, end="")
    

    Student's Code

    Tiffany JOSEPH

    import random
    
    def select (simple_words):
        return random.choice(simple_words)
    
    
    simple_words = ["apple", "basic", "cloud", "dance", "flute",
    "fruit", "grape", "image", "knife", "lemon", "mouse", "paste",
    "queen", "ratio", "scene", "space", "taste", "unite", "virus",
    "water", "bread", "chair", "diner", "ember", "fence", "games",
    "heart", "image", "judge", "knead", "laugh", "mouse", "nurse", "ocean", "paste", "queen", "ratio", "scene", "sense", "space", "speed", "spell", "sport", "steam", "style", "table", "taste", "timer", "touch", "tower", "train", "trust", "truth", "usage", "vault", "verse", "watch", "water", "waves", "whale", "wheel", "where", "which", "while", "white", "whole", "whose", "woman", "women", "world", "worth", "would", "write", "wrong", "year", "yield", "youth", "zest", "zips", "zones", "alive", "angel", "blood", "board", "brain", "cards", "carry", "cells", "chart", "chief", "class", "clone", "clubs", "coach", "craft", "crave", "crazy", "cross", "crowd", "crush", "dance"]
    wrong_guesses =0
    max_wrong_guesses =6
    #print(simple_words[53])
    
    random_item = select(simple_words)
    wordset = set(random_item)
    print(wordset)
    print(random_item)
    list = " _ " * len(random_item)
    
    list = list.split()
    print(list)
    
    while wrong_guesses < max_wrong_guesses:
    #i+= 1
    if wrong_guesses == 3:
        continue
        #print(i)
        guess=input('guess letter:')
    
    if guess in random_item:
        print("Guess correct")
    else:
        print("Guess incorrect")
    

    Amelia Taitt

    import random
    
    def selectword():
        return random.choice(simple_words)
    
    simple_words = [
    "apple", "bread", "chair", "dance", "eagle", "floor", "grape", "house", "ivory", "juice",
    "knife", "lemon", "money", "nurse", "ocean", "pizza", "queen", "river", "spoon", "table",
    "umbra", "voice", "water", "zebra", "angel", "block", "cloud", "drink", "earth", "fruit",
    "grass", "happy", "inbox", "jelly", "kitty", "laugh", "mango", "night", "onion", "plant",
    "quiet", "roast", "shell", "train", "unity", "vivid", "whale", "xyloh", "young", "zebra",
    "smile", "brush", "clock", "dream", "fairy", "ghost", "horse", "inlet", "jolly", "kneel",
    "light", "magic", "novel", "olive", "peach", "quilt", "razor", "scoop", "teach", "uncle",
    "visit", "watch", "yearn", "zebra", "alert", "bacon", "color", "dance", "enter", "frost",
    "glove", "honey", "ideal", "joint", "knock", "limit", "music", "never", "outer", "prime",
    "quiet", "round", "sleep", "tasty", "under", "voter", "world", "xerox", "yield", "zooms"
    ]
    guesses=set()
    correctguesses=set()
    list = [1, 4, 5, 2, 7, 9, 12, 3]
    random_element = selectword()
    wordlist=set(random_element)
    print(wordlist)
    print(f"The randomly chosen element is: {random_element}")
    
    guesses=4
    guess = input("guess a letter")
    
    if guess not in guesses :
        if guess in random_element:
            print("guess correctly")
    
        else:
            print("guess incorrectly")
    
    

    akaya alaexander

    import random
    
    def selectword():
        return random.choice(simple_words)
    def printdashes():
        for character in random_element:
            if character in correctguesses:
                print ("character",end= " ")
            else:
                print("-",end=" ")
        print()        
    simple_words = [
    "apple", "bread", "chair", "dance", "eagle", "floor", "grape", "house", "ivory", "juice",
    "knife", "lemon", "money", "nurse", "ocean", "pizza", "queen", "river", "spoon", "table",
    "umbra", "voice", "water", "zebra", "angel", "block", "cloud", "drink", "earth", "fruit",
    "grass", "happy", "inbox", "jelly", "kitty", "laugh", "mango", "night", "onion", "plant",
    "quiet", "roast", "shell", "train", "unity", "vivid", "whale", "xyloh", "young", "zebra",
    "smile", "brush", "clock", "dream", "fairy", "ghost", "horse", "inlet", "jolly", "kneel",
    "light", "magic", "novel", "olive", "peach", "quilt", "razor", "scoop", "teach", "uncle",
    "visit", "watch", "yearn", "zebra", "alert", "bacon", "color", "dance", "enter", "frost",
    "glove", "honey", "ideal", "joint", "knock", "limit", "music", "never", "outer", "prime",
    "quiet", "round", "sleep", "tasty", "under", "voter", "world", "xerox", "yield", "zooms"
    ]
    
    guesses=set()
    correctguesses=set()
    #list = [1, 4, 5, 2, 7, 9, 12, 3]
    random_element = selectword()
    printdashes()
    wordset =set(random_element)
    #print(wordset)
    guesses = 5
    incorrectguesses =0
    print (random_element)
    while guesses -incorrectguesses >0:
        guess = input("guess the letter ")
    
    
    #guesses.add
       if guess not in guesses:
           if guess in random_element:
               guesses.add(guess)
               correctguesses.add(guess)
    
               print("guess correctly")
            
           else:
               print("guess incorrectly")
                    incorrectguesses+=1
        else:
           print("You guessed this letter already")
    
    
    

    Gabrielle King

    def selectword():
        return random.choice(four_letter_words)
    
    
    def printdashes():
        for character in random_element:
            if character in correctguesses:
                print(character, end=" ")
            else:
                print(end="-")
        print()
    four_letter_words = [
        "Ball",
        "Bark",
        "Base",
        "Bath",
        "Bear",
        "Bell",
        "Belt",
        "Bend",
        "Best",
        "Bird",
        "Book",
        "Boot",
        "Cake",
        "Call",
        "Camp",
        "Card",
        "Cart",
        "Chat",
        "Chip",
        "Clap",
        "Clip",
        "Club",
        "Cold",
        "Cook",
        "Cool",
        "Corn",
        "Crab",
        "Dark",
        "Dash",
        "Desk",
        "Dive",
        "Doll",
        "Door",
        "Down",
        "Draw",
        "Drop",
        "Duck",
        "Dust",
        "Earn",
        "Edge",
        "Face",
        "Fall",
        "Farm",
        "Fast",
        "Feed",
        "Find",
        "Fire",
        "Fish",
        "Flat",
        "Flip",
        "Fold",
        "Food",
        "Foot",
        "Fork",
        "Frog",
        "Full",
        "Game",
        "Gift",
        "Girl",
        "Good",
        "Grab",
        "Hand",
        "Hard",
        "Hate",
        "Have",
        "Head",
        "Hear",
        "Help",
        "Hill",
        "Hold",
        "Home",
        "Hope",
        "Jump",
        "Kick",
        "King",
        "Lamp",
        "Land",
        "Left",
        "Life",
        "Lift",
        "Line",
        "Lion",
        "Lock",
        "Look",
        "Love",
        "Make",
        "Mark",
        "Meal",
        "Meet",
        "Milk",
        "Move",
        "Neck",
        "Open",
        "Park",
        "Play",
        "Read",
        "Ride",
        "Ring",
        "Road",
        "Rock",
    ]
    guesses = set()
    correctguesses = set()
    random_element = selectword().lower()
    word_set = set(random_element)
    print(word_set)
    printdashes()
    print(f"The randomly chosen word is : {random_element}")
    guesslimit = 4
    incorrectguesses = 0
    print (random_element)
    while (guesslimit-incorrectguesses)>0 and len(correctguesses) != len(word_set):
        guess = input("Guess a letter")
        if guess not in guesses:
            if guess in random_element:
               guesses.add(guess)
               print("guess correctly")
               correctguesses.add(guess)
               printdashes()
    
            else:
               guesses.add(guess)
               print("guess incorrectly")
               incorrectguesses+=1   
               print (f"you have {guesslimit-incorrectguesses} left")
    if len(correctguesses) == len(word_set):
        print(f"Congratulations!!! You have guessed the word correctly")
    else:
        print(f"I'm sorry!You've lost")
    
    
    

    Sharice Pierre

    import random
    
    def select (simple_words):
        return random.choice(simple_words)
    
    simple_words = ["apple", "basic", "cloud", "dance", "flute", "fruit", "grape", "image", "knife", "lemon", "mouse", "paste", "queen", "ratio", "scene", "space", "taste", "unite", "virus", "water", "bread", "chair", "diner", "ember", "fence", "games", "heart", "image", "judge", "knead", "laugh", "mouse", "nurse", "ocean", "paste", "queen", "ratio", "scene", "sense", "space", "speed", "spell", "sport", "steam", "style", "table", "taste", "timer", "touch", "tower", "train", "trust", "truth", "usage", "vault", "verse", "watch", "water", "waves", "whale", "wheel", "where", "which", "while", "white", "whole", "whose", "woman", "women", "world", "worth", "would", "write", "wrong", "year", "yield", "youth", "zest", "zips", "zones", "alive", "angel", "blood", "board", "brain", "cards", "carry", "cells", "chart", "chief", "class", "clone", "clubs", "coach", "craft", "crave", "crazy", "cross", "crowd", "crush", "dance"]
    wrong_guesses =0
    max_wrong_guesses =6
    #print(simple_words[53])
    
    random_item = select(simple_words)
    print(random_item)
    list = " _ " * len(random_item)
    
    list = list.split()
    print(list)
    
    
    wrong_guesses
    while wrong_guesses < max_wrong_guesses:
       i+= 1
       if wrong_guesses == 3:
          continue
       print(i)
    guess=input('guess letter:')
    
    if guess in random_item:
        print("Guess correct")
    else:
        print("Guess incorrect")
    

    Brianna

    import random
    
    def selectword():
        return random.choice(four_letter_words)
    
    four_letter_words = [
    "Ball", "Bark", "Base", "Bath", "Bear", "Bell", "Belt", "Bend", "Best", "Bird",
    "Book", "Boot", "Cake", "Call", "Camp", "Card", "Cart", "Chat", "Chip", "Clap",
    "Clip", "Club", "Cold", "Cook", "Cool", "Corn", "Crab", "Dark", "Dash", "Desk",
    "Dive", "Doll", "Door", "Down", "Draw", "Drop", "Duck", "Dust", "Earn", "Edge",
    "Face", "Fall", "Farm", "Fast", "Feed", "Find", "Fire", "Fish", "Flat", "Flip",
    "Fold", "Food", "Foot", "Fork", "Frog", "Full", "Game", "Gift", "Girl", "Good",
    "Grab", "Hand", "Hard", "Hate", "Have", "Head", "Hear", "Help", "Hill", "Hold",
    "Home", "Hope", "Jump", "Kick", "King", "Lamp", "Land", "Left", "Life", "Lift",
    "Line", "Lion", "Lock", "Look", "Love", "Make", "Mark", "Meal", "Meet", "Milk",
    "Move", "Neck", "Open", "Park", "Play", "Read", "Ride", "Ring", "Road", "Rock"
    ]
    random_element=selectword()
    print(selectword())
    print(f"The randomly chosen word is : {random_element}")
    guess = 5
    input("guess a letter that might be in the word")
    print(input)
    if guese is random_element:
        print ("guess correctly")
    else:
        print(guss incorrectly)
    
    

    Lesson - Sets

    What is a set?

    A set is an unordered, mutable, and unique collection of elements.

    Key features of sets:

    # Using curly braces
    fruits = {"apple", "banana", "cherry"}
    print(fruits)
    
    # Using the set() constructor
    numbers = set([1, 2, 3, 4])
    print(numbers)
    
    # Empty set (must use set(), not {})
    empty = set()
    print(type(empty))  # 
            

    Adding Elements to a Set

    colors = {"red", "green"}
    colors.add("blue")
    print(colors)  # {'red', 'green', 'blue'}
    

    Adding Mutliple Elements

    colors.update(["yellow", "orange"])
    print(colors)
    

    Removing Elements

    fruits = {"apple", "banana", "cherry"}
    
    fruits.remove("banana")  # Removes an item (raises error if not found)
    print(fruits)
    
    fruits.discard("mango")  # Removes safely (no error if missing)
    print(fruits)
    
    fruits.pop()  # Removes a random element
    print(fruits)
    
    fruits.clear()  # Empties the set
    print(fruits)
    

    Checking Membership

    fruits = {"apple", "banana", "cherry"}
    
    print("banana" in fruits)   # True
    print("orange" not in fruits)  # True
    

    Lesson - Functions

    What is a Function?

    In programming, a function is a reusable block of code designed to perform a specific task. Instead of writing the same code multiple times, you can define a function once and call it whenever needed.

    In video games, functions are widely used for actions like attacking, healing, jumping, or calculating scores.

    Why Use Functions?

    1. Reusability: Write the code once and reuse it multiple times. A player needs to heal, attack, or run. Instead of writing the same code repeatedly, use functions for each action.
    2. Readability: Break down complex logic into smaller, manageable pieces.
    3. Maintainability: Easier to update and debug specific parts of the code.
    4. Organization: Group related logic together for better clarity.

    How to Define a Function

    1. Define the Function: Use the def keyword in Python.
    2. Give the function a name
    3. Open and close brackets
    4. Use the colon after the brackets
    5. Write the code that you want to execute when the function is called(used)
    6. Call the Function: Use the function's name followed by parentheses.

    Defining a Function

    To define a function in Python, use the def keyword followed by the function name and parentheses. If the function has parameters (inputs), you put them inside the parentheses.

    def greet():
        print("Hello, welcome to Python!")
    
           

    Calling a Function

    Once a function is defined, you can call (invoke) it by using its name followed by parentheses.

    greet()
    
           

    Functions with Parameters

    You can pass information to a function using parameters. Parameters are specified inside the parentheses in the function definition.

    def greet(name):
        print(f"Hello, {name}!")
    

    Calling the Function

    greet("Alice")  # Calling the function with the argument "Alice"
    greet("Bob")    # Calling the function with the argument "Bob"
    

    Creating and Calling a Function with Multiple Parameters

    A function can take multiple parameters. Just separate them with commas inside the parentheses.

    def add(a, b):
        result = a + b
        print(f"The sum of {a} and {b} is {result}")
    

    Calling function

    add(5, 3) 
    

    Creating and Calling a Function with Default Parameters

    You can give parameters default values, which are used if no argument is provided when the function is called.

    def greet(name="Guest"):
        print(f"Hello, {name}!")
    

    You can call with arguments or without arguments

    greet("Alice")  # Hello, Alice!
    greet()         # Hello, Guest!
    

    Exercises

    Conclusion - Things You Should Remember

    stages = [
            '''
               -----
               |   |
               O   |
              /|\\  |
              / \\  |
                   |
            =========
            ''',
            '''
               -----
               |   |
               O   |
              /|\\  |
              /    |
                   |
            =========
            ''',
            '''
               -----
               |   |
               O   |
              /|\\  |
                   |
                   |
            =========
            ''',
            '''
               -----
               |   |
               O   |
              /|   |
                   |
                   |
            =========
            ''',
            '''
               -----
               |   |
               O   |
               |   |
                   |
                   |
            =========
            ''',
            '''
               -----
               |   |
               O   |
                   |
                   |
                   |
            =========
            ''',
            '''
               -----
               |   |
                   |
                   |
                   |
                   |
            =========
            '''
        ]
    

    Student Projects

    Briana

    import random
    
    def selectword():
        return random.choice(four_letter_words)
    
    four_letter_words = [
    "Ball", "Bark", "Base", "Bath", "Bear", "Bell", "Belt", "Bend", "Best", "Bird",
    "Book", "Boot", "Cake", "Call", "Camp", "Card", "Cart", "Chat", "Chip", "Clap",
    "Clip", "Club", "Cold", "Cook", "Cool", "Corn", "Crab", "Dark", "Dash", "Desk",
    "Dive", "Doll", "Door", "Down", "Draw", "Drop", "Duck", "Dust", "Earn", "Edge",
    "Face", "Fall", "Farm", "Fast", "Feed", "Find", "Fire", "Fish", "Flat", "Flip",
    "Fold", "Food", "Foot", "Fork", "Frog", "Full", "Game", "Gift", "Girl", "Good",
    "Grab", "Hand", "Hard", "Hate", "Have", "Head", "Hear", "Help", "Hill", "Hold",
    "Home", "Hope", "Jump", "Kick", "King", "Lamp", "Land", "Left", "Life", "Lift",
    "Line", "Lion", "Lock", "Look", "Love", "Make", "Mark", "Meal", "Meet", "Milk",
    "Move", "Neck", "Open", "Park", "Play", "Read", "Ride", "Ring", "Road", "Rock"
    ]
    random_element=selectword()
    print(selectword())
    print(f"The randomly chosen word is : {random_element}")
    guess = 5
    input("guess a letter that might be in the word")
    print(input)
    if guese is random_element:
        print ("guess correctly")
    else:
        print(guss incorrectly)
    

    Amelia Taitt

    import random
    
    def selectword():
        return random.choice(simple_words)
    def printdashes():
        for character in random_element:
            if character in correctguesses:
                print("character",end=" ")
            else:
                print(end="-")
        print()        
    simple_words = [
    "apple", "bread", "chair", "dance", "eagle", "floor", "grape", "house", "ivory", "juice",
    "knife", "lemon", "money", "nurse", "ocean", "pizza", "queen", "river", "spoon", "table",
    "umbra", "voice", "water", "zebra", "angel", "block", "cloud", "drink", "earth", "fruit",
    "grass", "happy", "inbox", "jelly", "kitty", "laugh", "mango", "night", "onion", "plant",
    "quiet", "roast", "shell", "train", "unity", "vivid", "whale", "xyloh", "young", "zebra",
    "smile", "brush", "clock", "dream", "fairy", "ghost", "horse", "inlet", "jolly", "kneel",
    "light", "magic", "novel", "olive", "peach", "quilt", "razor", "scoop", "teach", "uncle",
    "visit", "watch", "yearn", "zebra", "alert", "bacon", "color", "dance", "enter", "frost",
    "glove", "honey", "ideal", "joint", "knock", "limit", "music", "never", "outer", "prime",
    "quiet", "round", "sleep", "tasty", "under", "voter", "world", "xerox", "yield", "zooms"
    ]
    guesses=set()
    correctguesses=set()
    list = [1, 4, 5, 2, 7, 9, 12, 3]
    random_element = selectword()
    printdashes()
    wordlist=set(random_element)
    print(wordlist)
    print(f"The randomly chosen element is: {random_element}")
    
    guess = input("guess a letter")
    
    guesses=4
    incorrectguesses=0
    
    while guesses-incorrectguesses<0:
        if guess not in guesses:
          if guess in random_element:
            print("guess correctly")
    
        else:
            print("guess incorrectly")
            incorrectguesses+=1
    
    import random
    
    def selectword():
        return random.choice(simple_words)
    
    simple_words = [
    "apple", "bread", "chair", "dance", "eagle", "floor", "grape", "house", "ivory", "juice",
    "knife", "lemon", "money", "nurse", "ocean", "pizza", "queen", "river", "spoon", "table",
    "umbra", "voice", "water", "zebra", "angel", "block", "cloud", "drink", "earth", "fruit",
    "grass", "happy", "inbox", "jelly", "kitty", "laugh", "mango", "night", "onion", "plant",
    "quiet", "roast", "shell", "train", "unity", "vivid", "whale", "xyloh", "young", "zebra",
    "smile", "brush", "clock", "dream", "fairy", "ghost", "horse", "inlet", "jolly", "kneel",
    "light", "magic", "novel", "olive", "peach", "quilt", "razor", "scoop", "teach", "uncle",
    "visit", "watch", "yearn", "zebra", "alert", "bacon", "color", "dance", "enter", "frost",
    "glove", "honey", "ideal", "joint", "knock", "limit", "music", "never", "outer", "prime",
    "quiet", "round", "sleep", "tasty", "under", "voter", "world", "xerox", "yield", "zooms"
    ]
    list = [1, 4, 5, 2, 7, 9, 12, 3]
    random_element = selectword()
    
    guesses = 5
    print (random_element)
    guess = input("guess the letter ")
    
    
    
    if guess in random_element:
        print("guess correctly")
    else:
        print("guess incorrectly")
    
    #print(selectword())
    
    #print(selectword())
    

    Gabrielle

    import random
    
    def selectword ():
        return random.choice(four_letter_words)
    
    four_letter_words = [
    "Ball", "Bark", "Base", "Bath", "Bear", "Bell", "Belt", "Bend", "Best", "Bird",
    "Book", "Boot", "Cake", "Call", "Camp", "Card", "Cart", "Chat", "Chip", "Clap",
    "Clip", "Club", "Cold", "Cook", "Cool", "Corn", "Crab", "Dark", "Dash", "Desk",
    "Dive", "Doll", "Door", "Down", "Draw", "Drop", "Duck", "Dust", "Earn", "Edge",
    "Face", "Fall", "Farm", "Fast", "Feed", "Find", "Fire", "Fish", "Flat", "Flip",
    "Fold", "Food", "Foot", "Fork", "Frog", "Full", "Game", "Gift", "Girl", "Good",
    "Grab", "Hand", "Hard", "Hate", "Have", "Head", "Hear", "Help", "Hill", "Hold",
    "Home", "Hope", "Jump", "Kick", "King", "Lamp", "Land", "Left", "Life", "Lift",
    "Line", "Lion", "Lock", "Look", "Love", "Make", "Mark", "Meal", "Meet", "Milk",
    "Move", "Neck", "Open", "Park", "Play", "Read", "Ride", "Ring", "Road", "Rock"
    ]
    random_element =selectword().lower()
    #print( selectword ())
    print(f"The randomly chosen word is : {random_element}")
    guesse = 10
    #print (random_element)
    guesse=input("Guesse a letter that might be in the word ")
    
    
    
    if guesse in random_element:
        print("guesse correctly")
    else:
        print("guesse incorrectly")
    

    Sharice Pierre

    import random
    
    def select (simple_words):
        return random.choice(simple_words)
    print(f"simple_words")
    
    simple_words = ["apple", "basic", "cloud", "dance", "flute", "fruit", "grape", "image", "knife", "lemon", "mouse", "paste", "queen", "ratio", "scene", "space", "taste", "unite", "virus", "water", "bread", "chair", "diner", "ember", "fence", "games", "heart", "image", "judge", "knead", "laugh", "mouse", "nurse", "ocean", "paste", "queen", "ratio", "scene", "sense", "space", "speed", "spell", "sport", "steam", "style", "table", "taste", "timer", "touch", "tower", "train", "trust", "truth", "usage", "vault", "verse", "watch", "water", "waves", "whale", "wheel", "where", "which", "while", "white", "whole", "whose", "woman", "women", "world", "worth", "would", "write", "wrong", "year", "yield", "youth", "zest", "zips", "zones", "alive", "angel", "blood", "board", "brain", "cards", "carry", "cells", "chart", "chief", "class", "clone", "clubs", "coach", "craft", "crave", "crazy", "cross", "crowd", "crush", "dance"]
    wrong_guesses =0
    max_wrong_guesses =6
    #print(simple_words[53])
    
    random_item = select(simple_words)
    print(random_item)
    list = " _ " * len(random_item)
    
    list = list.split()
    print(list)
    
    while wrong_guesses < max_wrong_guesses:
        i+= 1
        if wrong_guesses == 3:
            continue
        print(i)
        guess=input('guess letter:')
    
        if guess in random_item:
            print("Guess correct")
        else:
            print("Guess incorrect")
    

    Submit Code Here