This Python project is similar to Rock, Scissor and Paper game. Here Lion wins against Lady, Hunter wins against the Lion and the Lady wins against the Hunter.
1. Declaring an array containing the elements lion, lady and hunter as strings.
2. Importing random and using random.choice to choose a string among these three.
3. Now, the user has to type 1,2 or 3 to choose their own choice.
4. If the choice of the user matches with the computer's choice, its a draw and no one gets a point.
5. If the user's choice wins against the computer's choice, the user wins and the user gets a point.
6. If the computer's choice wins against the user's choice, the computer wins and the computer gets a point.
7. The fastest one to reach 5 points among the user and the computer wins the game.
8. After the game, the user is given a choice to play the game again.
Submitted by Subhadeep Das (Subhadeep)
Download packets of source code on Coders Packet