+ 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

18th Jun 2019, 7:53 PM
Whanos
Whanos - avatar
6 odpowiedzi
+ 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.
18th Jun 2019, 8:11 PM
alvaro.pkg.tar.zst
alvaro.pkg.tar.zst - avatar
+ 2
You don't need the blank lines in between your answers. It works for me on sololearn.
18th Jun 2019, 8:18 PM
Jackson O’Donnell
+ 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
18th Jun 2019, 8:15 PM
alvaro.pkg.tar.zst
alvaro.pkg.tar.zst - avatar
+ 1
Yeah, it works fine
18th Jun 2019, 8:27 PM
alvaro.pkg.tar.zst
alvaro.pkg.tar.zst - avatar
0
ok. I will take .lower() into consideration for now on. Thank you.
18th Jun 2019, 8:13 PM
Whanos
Whanos - avatar
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.
18th Jun 2019, 8:25 PM
Whanos
Whanos - avatar