Hi, I am starting out with python coding and was looking for some feedback.
Constructive Criticism please.
Here is my code for game "Word Guess".
# Word Guess
#
# Word guess, is a game where the user has five chances to ask
# the computer if a certain letter is in the word chosen.
# then the player must make a guess at the whole word.
# Must import random to gather a random word from tuple
import random
WORDS = ("python",
"dictionary",
"happy",
"help",
"easy",
"language")
wordTuple = random.choice(WORDS)
# Create variable for correct.
correct = wordTuple
# Explain the game
print(
"""
Word Guessing.
Written:
Sarcasm
Choose up to five letters
then make a guess at the word.
(press enter at prompt to exit.)
"""
)
# Create the guessing of letters.
lGuess = input("Please guess a letter: ")
gRight = ""
gWrong = ""
numGuess = 0
# Set up number of tries
while numGuess <= 3:
if lGuess.lower() not in correct:
gWrong += lGuess.lower()
lGuess = input("No, Try again: ")
numGuess += 1
else:
gRight += lGuess.lower()
lGuess = input("Yes, Enter another: ")
numGuess += 1
# Start the guessing for the word.
print("\nNow you must guess the word, you have one try.")
# Print the Letters in and not in.
print("\nLetters not in the word:",gWrong)
print("\nLetters in the word:",gRight)
# Get the user guess for word.
wGuess = input("\nYour Guess: ")
while True:
if wGuess.lower() == correct:
print("\nWOW! You guessed correct.")
break
else:
print("\nSorry, Better luck next time.")
break
# Thank the player!!!
print("\nThanks for playing!")
# wait for user to exit
input("\n\nPress the enter key to exit.")
Oh and please be gentle written with no additional help.