+ 1
I would like help figuring out whatâs wrong with my quiz game.
I am creating a basic quiz that uses txt=input(), if, elif, else, and stuff like that. The problem that I have is that the input for the second question isnât working. The code seems fine, and the template is identical for all 3 questions so far. I even had question 2 and 3 switch places, and yet again, the middle question wonât input properly. Iâm thinking this is just a matter of having to run it through a different program since SoloLearn doesnât do inputs too well (at least for Python). If there are any other issues you find, can you give me tips about how to improve them? https://code.sololearn.com/cwTGFIIlUjdu/?ref=app
6 Answers
+ 2
First of all, after the input() function insert a .lower() like this n = input().lower()
That would convert the user input into lowercase, making the program not case sensitive, and even if it's not completely necessary, you should do it so you get used to it, it's a good practice.
+ 2
You don't need the blank lines in between your answers. It works for me on sololearn.
+ 1
Yes, I'm looking into that, the program took my input properly, but it didn't affect my score whatsoever.
Also, instead of:
PlayerScore = PlayerScore + 1
Use:
PlayerScore += 1
They have the same effect, but it's more readable and shorter
+ 1
Yeah, it works fine
0
ok. I will take .lower() into consideration for now on. Thank you.
0
Alvaro 1234. Could it be that the score wasnât affected because some answer choices are neutral? Or does it not change at all? It works for me except for question 2.