Skip to content

Walkthrough

Lewis Forbes edited this page Mar 25, 2024 · 9 revisions

This walkthrough demonstrates how Quiz Whiz can be used to generate a file which can be imported into Learn.

1. Look at the example file

Open the file assets/example.md (the file is within the assets folder). It should look like this:

This file contains quiz questions. When using the program, you will write your own file of this format.

2. Construct the command

The basic command format is python3 main.py InputFilepath --OutputType.
Because we are importing to Learn, we change --OutputType to --learn:

python3 main.py assets/example.md --learn

3. Run the command

  1. Open the program folder in the terminal (instructions)
  2. Run python3 main.py assets/example_input.md --learn

This should yield the following output:

4. Examine output & fix mistakes

The program gave a warning because it detected a potential mistake. This mistake occured becasuse there is no newline between the question and answers in the first question of the example. To fix this, open assets/example_input.md and change the first question to:

# Which ocean is the warmest?

- ^Atlantic
- Pacific
- Arctic

Save the file after adding the newline.

5. Rerun the program

Rerun python3 main.py assets/example_input.md --learn. There should now be no warnings, and the parse table shows one less essay question and one more multiple choice question, as a result of the first question now being parsed correctly.

6. Access the output

The program created a new file which can be imported to learn. Its filepath is output/LEARN_example_input.txt.

It can be uploaded to Learn using their instructions.

Next steps

These links are also available in the sidebar to the right.