The objective of this National 5 Computing task is to help you gain proficiency in using variables, selection (if statements), and loops (for or while loops) in computer programming. By completing this task, you will learn how to create an interactive quiz game.
Task Description
In this task, you will use Python to create a simple quiz game that quizzes the user on a chosen topic. This task combines the use of variables for storing data, selection for making decisions, and loops for repetition.
Instructions
You are expected to use a loop to interate through the questions.
- Iterate through the quiz questions.
- Present each question to the user.
- Allow the user to input their answer (e.g., A, B, C).
- Check if the answer is correct and update the user's score. Provide feedback to the user (e.g., "Correct!" or "Incorrect. The correct answer is...").
After all questions have been answered, the program should:
- Display the user's final score.
- Provide a message based on their score (e.g., "Great job!" or "Keep practicing!").
Testing and Debugging
You should thoroughly test your quiz program, making sure it works as expected and fixing any bugs or issues they encounter.
Task Submission
Save your Python programs and share them with your teacher.
Assessment Criteria
- Correctness and functionality of the quiz program.
- Effective use of variables for data storage.
- Proper use of selection (if statements) for decision-making.
- Effective use of loops for repetition.
- User-friendliness and clear feedback to the user.
- Participation in class discussions and adherence to coding conventions.
Extensions
Implement additional features, such as a timer for each question, a high-score system, or a more extensive question pool. This will challenge you to further develop your programming skills.