Case insensitive user input strings

In your string comparison, the correct answer itself had the first letter capitalized.

correctAnswer = "london"

userGuess = input("What is the capital of  Great Britain?: ").lower()

if userGuess == correctAnswer:
    print("Correct!")
else:
    print("Wrong")

Leave a Comment