How to create a multiple-choice test in R Markdown [HTML]

72 Views Asked by At

I'm trying to prepare a quiz/test for my students. It's a HTML book (the quiz is just a part of the book). So, basically, this test will have questions with one correct answer. For example:

What is the capital city of Germany?
A) Copenhagen
B) Riga
C) Berlin
D) Bucharest

If the student selects option A, the following answer will appear: Nope, Copenhagen is the capital of Denmark.
If the student selects option B, the following answer will appear: Nope, Riga is the capital of Latvia.
If the student selects option C, the following answer will appear: Correct.
If the student selects option D, the following answer will appear: Nope, Bucharest is the capital of Romania.


I need to knit the codes to HTML. I don't want to use a package.

0

There are 0 best solutions below