- Clone the repository
- Add questions to the
questions.json
file - Run
python server.py
to start the server - Open
localhost:3000
in your browser
Questions are stored in the questions.json
file. The questions are stored in an array of objects. Each object represents a question and has the following properties:
name
: The name of the questiontitle
: The title of the questiontype
: The type of question
See the SurveyJS documentation for the different question types and their properties. There are a lot of them, so I won't go into detail here.
As the user interacts with the quiz, the answers are stored in the answers.json
file. The answers are stored in an array of objects. Each object represents a question and has the following properties:
name
: The name of the questionvalue
: The value of the questioncorrectAnswer
: The correct answer to the questionisCorrect
: Whether the answer is correct
To run the solution, run python format_answers.py
. This will read the questions.json
and answers.json
files and format the answers into a human readable format.