#Begineer - Hangman

hangman.JPG

Goals: what we will make by the end of the day? to finish a project hangman game.

This day will cover following skills from previous classes of days, there are

  1. For & While Loops
  2. IF/ELSE
  3. Lists
  4. Strings
  5. Range
  6. Modules

#day7-1 hangman game

#Step 1 

word_list = ["aardvark", "baboon", "camel"]

#TODO-1 - Randomly choose a word from the word_list and assign it to a variable called chosen_word.
import random
chosen_word = random.choice(word_list)

#TODO-2 - Ask the user to guess a letter and assign their answer to a variable called guess. Make guess lowercase.
guess = input("Guess a letter: ").lower()

#TODO-3 - Check if the letter the user guessed (guess) is one of the leters in the chosen_word.
for letter in chosen_word:
    if letter == guess:
        print("Right")
    else:
        print("Wrong")

#Flow Chart

Solution+-+Hangman+Flowchart+1.png