A simple Python command-line game that pits the player against the computer in a classic Snake-Water-Gun match.
- The computer randomly chooses one of:
Snake,Water, orGun. - The player enters a choice using a single letter:
Sfor SnakeWfor WaterGfor Gun
- The program compares the player and computer choices, then prints the result.
- Snake beats Water
- Water beats Gun
- Gun beats Snake
- Same choice results in a draw
python main.pyWhen prompted, type S, W, or G and press Enter.
Enter your choice: S
You chose: Snake
Computer chose: Gun
You Lose!
- The game uses
random.choiceto make the computer selection. - Input must be exactly
S,W, orG. - Invalid input will raise a
KeyErrorbecause the code does not currently handle unexpected entries.