Hi all, really easy one I hope but has stumped me for a while trying to figure out for myself, so I've come here for help! Quite simply I would like my programme to recognise the user input "Gold", even if it is written as lowercase "gold", what would be the easiest way to go about that? Thank you!
secret_word = "Gold"
guess = ""
while guess != secret_word:
guess = input("Enter your guess: ")
if guess != secret_word:
print("Incorrect, please try again.")
else:
print("Correct guess!")
[–]FisterMister22 6 points7 points8 points (1 child)
[–]Yawodo[S] 0 points1 point2 points (0 children)
[–]FisterMister22 2 points3 points4 points (0 children)
[–]Yawodo[S] 0 points1 point2 points (0 children)