0

I’m new with Python. Just One question. I try to create a mini quizz game and i want avoid this :

Answer = Input(« « «  Who sing : « Thriller » ? » » »)

If answer == « Michael Jackson »: Print(« Good. »)

Else:

Print(« Wrong. »)

The problem is that if the user answer «michael jackson », the code run with wrong.

How can i fixed that?

Thanks

BatRuby
  • 11
  • 3

1 Answers1

0

The way that this is usually done is to just turn all the input to lowercase. This can be done with the .lower() method on the input string. The corrector answer would then be "michael jackson".

absolutezero
  • 134
  • 3