[Solved] Python, Explain def function and scoring system? [closed]


i need to know how the code at the top of the page allows a counter to add up all the correct answers in the quiz

Formatting matters in Python, so take care:

for i in range(questions): #ask 10 questions
    if quiz():
        score +=1

quiz() gets called 10 times, and returns True if a question was answered correctly. In this case, the variable score will be incremented.

4

solved Python, Explain def function and scoring system? [closed]