Multiple choice questions

In this project, you'll learn to build a Graphical User Interface (GUI) application using the tkinter built-in module. The task is to ask multiple choice questions, collect user answers and finally display how many questions were answered correctly. Before coding the GUI, you'll first see how to write a program to read a file containing questions and choices and implement a solution using the input() function. To make the task more interesting, you'll also randomize the order of questions and choices.

Project summary

  • Decide a format to parse a file for questions, choices and the correct answer
  • Read the file, separate out questions, choices and save the answer for reference
  • Implement a solution using input() function
  • Randomize the order of questions and choices for fun
  • Learn basics of tkinter and understand why class is preferred for GUIs
  • Implement a GUI application

The following modules and concepts will be utilized in this project:

Real world influence

I've long wanted to create an interactive GUI for programming exercises. This is already provided by many websites, but I wanted a desktop solution that can be customized.

The MCQ implementation here is just a tiny part of that idea. As the saying goes, mountains are conquered one step at a time.