mirror of
https://github.com/metafy-social/python-scripts.git
synced 2025-01-18 07:17:03 +00:00
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:
parent
3108d05d03
commit
fe2800d44d
|
@ -4,8 +4,10 @@ import random
|
||||||
def getPlayer():
|
def getPlayer():
|
||||||
player = "empty"
|
player = "empty"
|
||||||
player = input("Please Enter You Choice From - Rock | Paper | Scissor = ")
|
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 = input("Please Enter You Choice From - Rock | Paper | Scissor = ")
|
||||||
|
player = player[0].upper()+player[1:]
|
||||||
return player
|
return player
|
||||||
|
|
||||||
# Function to generate input from the bot
|
# Function to generate input from the bot
|
||||||
|
@ -72,4 +74,4 @@ def gameBegins():
|
||||||
endTheGame = input("You wish to end? Choose Y/N: ")
|
endTheGame = input("You wish to end? Choose Y/N: ")
|
||||||
print("\nThank you for Playing!")
|
print("\nThank you for Playing!")
|
||||||
|
|
||||||
start()
|
start()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user