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
This commit is contained in:
Abhishek Tanwar 2023-03-20 23:43:45 +05:30 committed by GitHub
parent 3108d05d03
commit fe2800d44d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,8 +4,10 @@ import random
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()
start()