Home > Enterprise >  trouble with for loops printing if statements
trouble with for loops printing if statements

Time:06-08

Image code

I made a simple quiz program, as I'm still new to python. I wanted to implement what I learned, using for loops and if statements. The problem is when the if statements are out of the for loop they print correctly when user enters their input although, both the questions get printed. when inside the for loop nothing prints.

CodePudding user response:

I fixed this error, I,m guessing two variables with for loops caused it not to print the answer? if anyone knows why or how please let me know as this is what fixed my code to print the answer.

Fixed Image code

  • Related