mac-mini:hangman raj$ python3 Hangman.py phrases.txt
This program plays the game of hangman.
The computer will pick a random phrase.
After 5 wrong guesses you lose.
Please choose a topic
(0) MOVIE
(1) COUNTRY NAME
(2) NBA TEAM
Enter topic number (0,1,...): 0
I am thinking of a MOVIE ...
The current phrase is **** **** *******
The letters you have not guessed yet are:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Enter your next guess: t
You guessed T
That is present in the secret phrase.
You have made 0 wrong guesses.
The current phrase is **** **** ***T***
The letters you have not guessed yet are:
A B C D E F G H I J K L M N O P Q R S U V W X Y Z
Enter your next guess: h
You guessed H
That is present in the secret phrase.
You have made 0 wrong guesses.
The current phrase is **** **** H**T***
The letters you have not guessed yet are:
A B C D E F G I J K L M N O P Q R S U V W X Y Z
Enter your next guess: e
You guessed E
That is not present in the secret phrase.
You have made 1 wrong guess.
The current phrase is **** **** H**T***
The letters you have not guessed yet are:
A B C D F G I J K L M N O P Q R S U V W X Y Z
Enter your next guess: i
You guessed I
That is present in the secret phrase.
You have made 1 wrong guess.
The current phrase is **** *I** H**TI**
The letters you have not guessed yet are:
A B C D F G J K L M N O P Q R S U V W X Y Z
Enter your next guess: o
You guessed O
That is present in the secret phrase.
You have made 1 wrong guess.
The current phrase is *OO* *I** H**TI**
The letters you have not guessed yet are:
A B C D F G J K L M N P Q R S U V W X Y Z
Enter your next guess: g
You guessed G
That is present in the secret phrase.
You have made 1 wrong guess.
The current phrase is GOO* *I** H**TI*G
The letters you have not guessed yet are:
A B C D F J K L M N P Q R S U V W X Y Z
Enter your next guess: u
You guessed U
That is present in the secret phrase.
You have made 1 wrong guess.
The current phrase is GOO* *I** HU*TI*G
The letters you have not guessed yet are:
A B C D F J K L M N P Q R S V W X Y Z
Enter your next guess: n
You guessed N
That is present in the secret phrase.
You have made 1 wrong guess.
The current phrase is GOO* *I** HUNTING
The letters you have not guessed yet are:
A B C D F J K L M P Q R S V W X Y Z
Enter your next guess: w
You guessed W
That is present in the secret phrase.
You have made 1 wrong guess.
The current phrase is GOO* WI** HUNTING
The letters you have not guessed yet are:
A B C D F J K L M P Q R S V X Y Z
Enter your next guess: l
You guessed L
That is present in the secret phrase.
You have made 1 wrong guess.
The current phrase is GOO* WILL HUNTING
The letters you have not guessed yet are:
A B C D F J K M P Q R S V X Y Z
Enter your next guess: d
You guessed D
That is present in the secret phrase.
The phrase is GOOD WILL HUNTING
YOU WIN!!!!
Do you want to play again? (y/n): y
I am thinking of a MOVIE ...
The current phrase is *********** ********
The letters you have not guessed yet are:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Enter your next guess: a
You guessed A
That is present in the secret phrase.
You have made 0 wrong guesses.
The current phrase is *********** *A******
The letters you have not guessed yet are:
B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Enter your next guess: s
You guessed S
That is present in the secret phrase.
You have made 0 wrong guesses.
The current phrase is **********S *AS****S
The letters you have not guessed yet are:
B C D E F G H I J K L M N O P Q R T U V W X Y Z
Enter your next guess: d
You guessed D
That is present in the secret phrase.
You have made 0 wrong guesses.
The current phrase is **********S *AS***DS
The letters you have not guessed yet are:
B C E F G H I J K L M N O P Q R T U V W X Y Z
Enter your next guess: f
You guessed F
That is not present in the secret phrase.
You have made 1 wrong guess.
The current phrase is **********S *AS***DS
The letters you have not guessed yet are:
B C E G H I J K L M N O P Q R T U V W X Y Z
Enter your next guess: g
You guessed G
That is present in the secret phrase.
You have made 1 wrong guess.
The current phrase is **G*******S *AS***DS
The letters you have not guessed yet are:
B C E H I J K L M N O P Q R T U V W X Y Z
Enter your next guess: h
You guessed H
That is not present in the secret phrase.
You have made 2 wrong guesses.
The current phrase is **G*******S *AS***DS
The letters you have not guessed yet are:
B C E I J K L M N O P Q R T U V W X Y Z
Enter your next guess: j
You guessed J
That is not present in the secret phrase.
You have made 3 wrong guesses.
The current phrase is **G*******S *AS***DS
The letters you have not guessed yet are:
B C E I K L M N O P Q R T U V W X Y Z
Enter your next guess: y
You guessed Y
That is not present in the secret phrase.
You have made 4 wrong guesses.
The current phrase is **G*******S *AS***DS
The letters you have not guessed yet are:
B C E I K L M N O P Q R T U V W X Z
Enter your next guess: u
You guessed U
That is present in the secret phrase.
You have made 4 wrong guesses.
The current phrase is **G**U***US *AS***DS
The letters you have not guessed yet are:
B C E I K L M N O P Q R T V W X Z
Enter your next guess: i
You guessed I
That is present in the secret phrase.
You have made 4 wrong guesses.
The current phrase is I*G**U*I*US *AS***DS
The letters you have not guessed yet are:
B C E K L M N O P Q R T V W X Z
Enter your next guess: e
You guessed E
That is present in the secret phrase.
You have made 4 wrong guesses.
The current phrase is I*G**U*I*US *AS*E*DS
The letters you have not guessed yet are:
B C K L M N O P Q R T V W X Z
Enter your next guess: a
A is not a valid guess.
The letters you have not guessed yet are:
B C K L M N O P Q R T V W X Z
Enter your next guess: b
You guessed B
That is present in the secret phrase.
You have made 4 wrong guesses.
The current phrase is I*G**U*I*US BAS*E*DS
The letters you have not guessed yet are:
C K L M N O P Q R T V W X Z
Enter your next guess: p
You guessed P
That is not present in the secret phrase.
You lose. The secret phrase was INGLOURIOUS BASTERDS
Do you want to play again? (y/n): n
mac-mini:hangman raj$