Aim:

To create a simple test with only Multiple choice questions in the text (.txt) file format. 



Inputs:

A sample file is given below.


Example MCQ test: Text file

MCQ Test Example File


Structure of File:
The text (.txt) file format for a simple MCQ test should have 
  • Header: A set of primary details at the top. Each item in the header is specified after using a 'Tag'
  • Questions: One below the other after the Header. The question, the answer options, the answer, marks etc are all typed in after the corresponding 'Tag'

Note: In the below shown File format, the highlighted text are all 'Tags' which should be specified as it is at the beginning of a line followed by the content.

Steps to Create:
  1. Add a Title for the test by putting the title for the test after the tag (Title. ) - This is mandatory.
  2. Specify the time allotted (in minutes) for the test (Duration. ) and the Subject it is about (Subject. ) - These are optional
  3. Add Questions as shown below. 



Example file format:


##############################################################################################


Title. Science test

Duration. 5

Subject. Science


Question. Gravity is responsible for the

Option A. orbits of the planets around the Sun.

Option B. rotation of a planet on its axis.

Option C. tilt of Earth's axis.

Option D. phases of the Moon.

Answer. A

Topic. Physics

Marks. 1



Question. The number of carbon atoms in one molecule of benzene is
Option A. 4
Option B. 5
Option C. 6
Option D. 7
Answer. C
Topic. Chemistry
Marks. 2
NegativeMarks. 0.25
Level. 2

##############################################################################################



Notes: 

  1. To know how images can be added to the question, answer options or the solution, refer to the article 'Adding Images'.
  2. For a detailed list of 'Tags', refer the article on Tags.