Objective | : | This program simulates how to generate a random Multiple Choice Question (MCQ). |
Data Source | : | The sources of the questions are from a dictionary, where its item has a key and a value. The key is the question itself, and the value consists of 4 (four) choices of answer. We also pre-defined the key answer beforehand in a list. |
How | : | Initially, we shuffle how questions order will appear using a random library and a dummy list. Subsequently, during each iteration, we 'pop' which number will appear (i.e., 'index') and print the question to the user based on that index. We then take the user's input and compare whether the key answer of the related index matches the input or not. |
-
Notifications
You must be signed in to change notification settings - Fork 0
Small py program to simulate random multiple choice question
License
syahirulfaiz/SimpleMultipleChoicePy
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Small py program to simulate random multiple choice question
Topics
Resources
License
Stars
Watchers
Forks
Releases
No releases published