commit 6c6d61ec6f1c308c1a3054b0191a0fe972a23e4a Author: ryanwong Date: Sat Nov 26 01:35:24 2022 -0500 first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..c7b51c7 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# frontend task 3 +Create a quiz in html/css/js using main.js as the data. + +You can see the screenshots of how the different quiz questions should look like. + +All answers should be saved at the end in a response object + +This need to be completed at end of day. diff --git a/choose many options.png b/choose many options.png new file mode 100644 index 0000000..a16523e Binary files /dev/null and b/choose many options.png differ diff --git a/long text.png b/long text.png new file mode 100644 index 0000000..0df5cdb Binary files /dev/null and b/long text.png differ diff --git a/main.js b/main.js new file mode 100644 index 0000000..69e757c --- /dev/null +++ b/main.js @@ -0,0 +1,52 @@ +let quiz = [ + { + "id": 1, + "type": "short_answer", + "question": "Why is the sky blue?", + "answers": [], + "correct_answer": 0 + }, + { + "id": 2, + "type": "multiple_choice", + "question": "Why is the sky blue?", + "answers": [ + { "id": 1, "answer": "Because of physics"}, + { "id": 2, "answer": "Because that the way it always was"}, + { "id": 3, "answer": "I don't know"}, + ], + "correct_answer": 1 + }, + { + "id": 3, + "type": "multiple_selection_choice", + "question": "Why is the sky blue?", + "answers": [ + { "id": 1, "answer": "Because of physics"}, + { "id": 2, "answer": "Because that the way it always was"}, + { "id": 3, "answer": "I don't know"}, + ], + "correct_answer": 1 + }, + { + "id": 4, + "type": "long_text", + "question": "Why is the sky blue?", + "answers": [], + "correct_answer": 0 + }, + { + "id": 5, + "type": "description", + "question": "random text to show to the user", + "answers": [], + "correct_answer": 0 + }, + { + "id": 6, + "type": "true_false", + "question": "Is the sky blue", + "answers": [], + "correct_answer": 2 + } +]; diff --git a/multiple choice.png b/multiple choice.png new file mode 100644 index 0000000..3c0a38a Binary files /dev/null and b/multiple choice.png differ diff --git a/short text.png b/short text.png new file mode 100644 index 0000000..df66763 Binary files /dev/null and b/short text.png differ