From a92bc8fc847276c9fa1c823f8b8fae9005a83a3b Mon Sep 17 00:00:00 2001 From: MasterMeet <58728390+MasterMeet@users.noreply.github.com> Date: Thu, 1 Oct 2020 00:47:01 +0530 Subject: [PATCH] SnakeWaterGunGame Basic Snake Water Gun Game --- SnakeWaterGunGame | 71 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 SnakeWaterGunGame diff --git a/SnakeWaterGunGame b/SnakeWaterGunGame new file mode 100644 index 0000000..a1db96f --- /dev/null +++ b/SnakeWaterGunGame @@ -0,0 +1,71 @@ +# Snake Water Gun Game Devlopement +import random +NoOfRound = 10 +user = 0 +comp = 0 + +while NoOfRound > 0: + print("---------------------------------") + print("Choices:\nS-Snake\nW-Water\nG-Gun") + c = input("Enter Your Choice:-") + choice = c.capitalize() + + if choice in ('S', 'W', 'G'): + + n = random.randint(1, 3) + + if (choice == 'S' and n == 1) or (choice == 'W' and n == 2) or (choice == 'G' and n == 3): + print("Draw") + + elif choice == "S": + if n == 2: + print("Congratulations. You Won!") + user += 1 + else: + print("Better Luck Next Time!") + comp += 1 + + elif choice == "W": + if n == 3: + print("Congratulations. You Won!") + user += 1 + else: + print("Better Luck Next Time!") + comp += 1 + + else: + if n == 1: + print("Congratulations. You Won!") + user += 1 + else: + print("Better Luck Next Time!") + comp += 1 + + else: + print("Invalid Choice") + continue + NoOfRound -= 1 + +print("---------------------------------") + +if user == comp: + print("Draw!") +elif user > comp: + print("Hurray. You won!") +else: + print("You Lost!") + +print("---------------------------------") + +print("Scoreboard") +print("Your Score:-", user, "\nComputer's Score:-", comp ) + +print("---------------------------------") + + + + + + + +