Define: quiz.py

The different sets of variables I will need to make this program work will be listed below:

  • q0-q9: Contains the question that is outputted to the user
  • q0CorAns-q9CorAns: Contains the correct answer to the associated question
  • SCORE: A global variable that is used to keep track of the number of correct answers the user selected
  • grade: The user’s final grade in a percentage, will be outputted to the user
  • ansU: Variable that is reused to hold the user’s input
  • check: A boolean variable that is used as an escape condition for the question while loop
  • showAnsCheck: A boolean variable that is used as an escape condition for the show correct answer while loop

Leave a comment