From fe2800d44d7ecd7031ad54a9a182bd475a24c064 Mon Sep 17 00:00:00 2001 From: Abhishek Tanwar Date: Mon, 20 Mar 2023 23:43:45 +0530 Subject: [PATCH] Resolved issue #440 Case sensitivity for user inputs removed as per the issue #440 Removed case sensitivity from user input by converting all user input to lower case. Issue #440 resolved --- scripts/Rock_Paper_Scissor/rock_paper_scissor.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/Rock_Paper_Scissor/rock_paper_scissor.py b/scripts/Rock_Paper_Scissor/rock_paper_scissor.py index 5fb9b4d..7295f4c 100644 --- a/scripts/Rock_Paper_Scissor/rock_paper_scissor.py +++ b/scripts/Rock_Paper_Scissor/rock_paper_scissor.py @@ -4,8 +4,10 @@ def getPlayer(): player = "empty" player = input("Please Enter You Choice From - Rock | Paper | Scissor = ") - while not (player == "Rock" or player == "Paper" or player == "Scissor"): + player = player.lower() + while not (player == "rock" or player == "paper" or player == "scissor"): player = input("Please Enter You Choice From - Rock | Paper | Scissor = ") + player = player[0].upper()+player[1:] return player # Function to generate input from the bot @@ -72,4 +74,4 @@ def gameBegins(): endTheGame = input("You wish to end? Choose Y/N: ") print("\nThank you for Playing!") -start() \ No newline at end of file +start()