From 7fa258bca8ef7db9e35556547b71b4a9e1400bd7 Mon Sep 17 00:00:00 2001 From: Dmitri Soshnikov Date: Fri, 29 Apr 2022 20:20:16 +0300 Subject: [PATCH] Update quiz questions --- .../src/assets/translations/en/index.js | 18 +-- .../src/assets/translations/en/lesson-1.json | 48 +++---- .../src/assets/translations/en/lesson-2.json | 43 +++--- .../src/assets/translations/en/lesson-3.json | 43 +++--- .../src/assets/translations/en/lesson-4.json | 122 ++++++++++++++++- .../src/assets/translations/en/lesson-5.json | 128 ++++++++++++++++++ .../{questions.txt => questions-en.txt} | 0 etc/quiz-src/qzmkjson.py | 6 +- 8 files changed, 323 insertions(+), 85 deletions(-) create mode 100644 etc/quiz-app/src/assets/translations/en/lesson-5.json rename etc/quiz-src/{questions.txt => questions-en.txt} (100%) diff --git a/etc/quiz-app/src/assets/translations/en/index.js b/etc/quiz-app/src/assets/translations/en/index.js index 320fea62..3ef53de2 100644 --- a/etc/quiz-app/src/assets/translations/en/index.js +++ b/etc/quiz-app/src/assets/translations/en/index.js @@ -1,11 +1,7 @@ -import en1 from "./lesson-1.json"; -import en2 from "./lesson-2.json"; -import en3 from "./lesson-3.json"; - -const quiz = { - 0: en1[0], - 1: en2[0], - 2: en3[0] -}; - -export default quiz; +import x1 from "./lesson-1.json"; +import x2 from "./lesson-2.json"; +import x3 from "./lesson-3.json"; +import x4 from "./lesson-4.json"; +import x5 from "./lesson-5.json"; +const quiz = { 0 : x1[0], 1 : x2[0], 2 : x3[0], 3 : x4[0], 4 : x5[0] }; +export default quiz; \ No newline at end of file diff --git a/etc/quiz-app/src/assets/translations/en/lesson-1.json b/etc/quiz-app/src/assets/translations/en/lesson-1.json index efd45c66..2beaf4a9 100644 --- a/etc/quiz-app/src/assets/translations/en/lesson-1.json +++ b/etc/quiz-app/src/assets/translations/en/lesson-1.json @@ -5,7 +5,7 @@ "error": "Sorry, try again", "quizzes": [ { - "id": 1, + "id": 101, "title": "Introduction to AI - Pre Quiz", "quiz": [ { @@ -13,15 +13,15 @@ "answerOptions": [ { "answerText": "Charles Barkley", - "isCorrect": "false" + "isCorrect": false }, { "answerText": "Charles Babbage", - "isCorrect": "true" + "isCorrect": true }, { "answerText": "Charles Darwin", - "isCorrect": "false" + "isCorrect": false } ] }, @@ -30,11 +30,11 @@ "answerOptions": [ { "answerText": "True", - "isCorrect": "false" + "isCorrect": false }, { "answerText": "False", - "isCorrect": "true" + "isCorrect": true } ] }, @@ -43,51 +43,51 @@ "answerOptions": [ { "answerText": "false, they are usually designed by a series of rules.", - "isCorrect": "false" + "isCorrect": false }, { - "answerText": "true, they are usually considered to be 'intelligent'.", - "isCorrect": "false" + "answerText": "true, they are usually considered to be 'intelligent", + "isCorrect": false }, { "answerText": "false, but they are increasingly able to pass Turing tests as they become more sophisticated.", - "isCorrect": "true" + "isCorrect": true } ] } ] }, { - "id": 2, - "title": "Introduction to AI: Post-Quiz", + "id": 201, + "title": "Introduction to AI - Post-Quiz", "quiz": [ { "questionText": "A top-down approach to AI is a model of reasoning called", "answerOptions": [ { "answerText": "strategic reasoning", - "isCorrect": "false" + "isCorrect": false }, { "answerText": "symbolic reasoning", - "isCorrect": "true" + "isCorrect": true }, { "answerText": "synergistic reasoning", - "isCorrect": "false" + "isCorrect": false } ] }, { - "questionText": "A bottom-up approach to AI might leverage a neural network to", + "questionText": "A bottom-up approach to AI is based on neural networks", "answerOptions": [ { - "answerText": "true", - "isCorrect": "true" + "answerText": "True", + "isCorrect": true }, { - "answerText": "false", - "isCorrect": "false" + "answerText": "False", + "isCorrect": false } ] }, @@ -96,15 +96,15 @@ "answerOptions": [ { "answerText": "1950s", - "isCorrect": "false" + "isCorrect": false }, { "answerText": "1960s", - "isCorrect": "false" + "isCorrect": false }, { "answerText": "1970s", - "isCorrect": "true" + "isCorrect": true } ] } @@ -112,4 +112,4 @@ } ] } -] +] \ No newline at end of file diff --git a/etc/quiz-app/src/assets/translations/en/lesson-2.json b/etc/quiz-app/src/assets/translations/en/lesson-2.json index 2ae035bf..7cf1747b 100644 --- a/etc/quiz-app/src/assets/translations/en/lesson-2.json +++ b/etc/quiz-app/src/assets/translations/en/lesson-2.json @@ -4,9 +4,8 @@ "complete": "Congratulations, you completed the quiz!", "error": "Sorry, try again", "quizzes": [ - { - "id": 3, + "id": 102, "title": "Knowledge Representation and Expert Systems: Pre-Quiz", "quiz": [ { @@ -14,15 +13,15 @@ "answerOptions": [ { "answerText": "knowledge seeking and reading", - "isCorrect": "false" + "isCorrect": false }, { "answerText": "knowledge representation and reasoning", - "isCorrect": "true" + "isCorrect": true }, { "answerText": "knowledge reasoning and seeking", - "isCorrect": "false" + "isCorrect": false } ] }, @@ -30,12 +29,12 @@ "questionText": "Knowledge is the same as information", "answerOptions": [ { - "answerText": "true", - "isCorrect": "false" + "answerText": "True", + "isCorrect": false }, { - "answerText": "false", - "isCorrect": "true" + "answerText": "False", + "isCorrect": true } ] }, @@ -44,22 +43,22 @@ "answerOptions": [ { "answerText": "active learning process", - "isCorrect": "true" + "isCorrect": true }, { "answerText": "passive learning process", - "isCorrect": "false" + "isCorrect": false }, { "answerText": "both of these", - "isCorrect": "false" + "isCorrect": false } ] } ] }, { - "id": 4, + "id": 202, "title": "Knowledge Representation and Expert Systems: Post-Quiz", "quiz": [ { @@ -67,15 +66,15 @@ "answerOptions": [ { "answerText": "algorithmic", - "isCorrect": "true" + "isCorrect": true }, { "answerText": "symbolic", - "isCorrect": "false" + "isCorrect": false }, { "answerText": "synergistic", - "isCorrect": "false" + "isCorrect": false } ] }, @@ -84,11 +83,11 @@ "answerOptions": [ { "answerText": "true", - "isCorrect": "true" + "isCorrect": true }, { "answerText": "false", - "isCorrect": "false" + "isCorrect": false } ] }, @@ -97,15 +96,15 @@ "answerOptions": [ { "answerText": "executes a reasoning loop", - "isCorrect": "true" + "isCorrect": true }, { "answerText": "looks for a goal", - "isCorrect": "false" + "isCorrect": false }, { "answerText": "starts over", - "isCorrect": "false" + "isCorrect": false } ] } @@ -113,4 +112,4 @@ } ] } -] +] \ No newline at end of file diff --git a/etc/quiz-app/src/assets/translations/en/lesson-3.json b/etc/quiz-app/src/assets/translations/en/lesson-3.json index 2646d747..e0caead0 100644 --- a/etc/quiz-app/src/assets/translations/en/lesson-3.json +++ b/etc/quiz-app/src/assets/translations/en/lesson-3.json @@ -4,25 +4,24 @@ "complete": "Congratulations, you completed the quiz!", "error": "Sorry, try again", "quizzes": [ - { - "id": 5, - "title": "Introduction to Neural Networks - Perceptron: Post-Quiz", + "id": 103, + "title": "Introduction to Neural Networks - Perceptron: Pre-Quiz", "quiz": [ { "questionText": "Early neural networks required", "answerOptions": [ { "answerText": "manual weight adjusting", - "isCorrect": "true" + "isCorrect": true }, { "answerText": "terabytes of data", - "isCorrect": "false" + "isCorrect": false }, { "answerText": "special reasoning", - "isCorrect": "false" + "isCorrect": false } ] }, @@ -31,11 +30,11 @@ "answerOptions": [ { "answerText": "true", - "isCorrect": "true" + "isCorrect": true }, { "answerText": "false", - "isCorrect": "false" + "isCorrect": false } ] }, @@ -43,23 +42,23 @@ "questionText": "A perceptron is a ___ type of model", "answerOptions": [ { - "answerText": "linear regression", - "isCorrect": "false" + "answerText": "multi-class classification", + "isCorrect": false }, { "answerText": "clustering", - "isCorrect": "false" + "isCorrect": false }, { "answerText": "binary classification", - "isCorrect": "true" + "isCorrect": true } ] } ] }, { - "id": 6, + "id": 203, "title": "Introduction to Neural Networks - Perceptron: Post-Quiz", "quiz": [ { @@ -67,15 +66,15 @@ "answerOptions": [ { "answerText": "size", - "isCorrect": "false" + "isCorrect": false }, { "answerText": "error", - "isCorrect": "true" + "isCorrect": true }, { "answerText": "nodes", - "isCorrect": "false" + "isCorrect": false } ] }, @@ -84,11 +83,11 @@ "answerOptions": [ { "answerText": "true", - "isCorrect": "true" + "isCorrect": true }, { "answerText": "false", - "isCorrect": "false" + "isCorrect": false } ] }, @@ -97,15 +96,15 @@ "answerOptions": [ { "answerText": "learning rate", - "isCorrect": "false" + "isCorrect": false }, { "answerText": "weights", - "isCorrect": "true" + "isCorrect": true }, { "answerText": "gradient", - "isCorrect": "false" + "isCorrect": false } ] } @@ -113,4 +112,4 @@ } ] } -] +] \ No newline at end of file diff --git a/etc/quiz-app/src/assets/translations/en/lesson-4.json b/etc/quiz-app/src/assets/translations/en/lesson-4.json index 8faabde9..ad449639 100644 --- a/etc/quiz-app/src/assets/translations/en/lesson-4.json +++ b/etc/quiz-app/src/assets/translations/en/lesson-4.json @@ -4,7 +4,125 @@ "complete": "Congratulations, you completed the quiz!", "error": "Sorry, try again", "quizzes": [ - + { + "id": 104, + "title": "Neural Networks - Pre Quiz", + "quiz": [ + { + "questionText": "The quality of prediction is measured by Loss function", + "answerOptions": [ + { + "answerText": "True", + "isCorrect": true + }, + { + "answerText": "False", + "isCorrect": false + } + ] + }, + { + "questionText": "One layer network is capable of classifying ____", + "answerOptions": [ + { + "answerText": "linearly joined classes", + "isCorrect": false + }, + { + "answerText": "linearly separable classes", + "isCorrect": true + }, + { + "answerText": "single layers of classes", + "isCorrect": false + } + ] + }, + { + "questionText": "The method of training multi-layered perceptron is called ____", + "answerOptions": [ + { + "answerText": "back propagation", + "isCorrect": true + }, + { + "answerText": "multiple propagation", + "isCorrect": false + }, + { + "answerText": "front propagation", + "isCorrect": false + } + ] + } + ] + }, + { + "id": 204, + "title": "Neural Networks - Post Quiz", + "quiz": [ + { + "questionText": "We use ____ for regression loss functions", + "answerOptions": [ + { + "answerText": "absolute error", + "isCorrect": false + }, + { + "answerText": "mean squared error", + "isCorrect": false + }, + { + "answerText": "all of the above", + "isCorrect": true + } + ] + }, + { + "questionText": "All but one is a type of classification loss function", + "answerOptions": [ + { + "answerText": "0-1 loss", + "isCorrect": false + }, + { + "answerText": "binary loss", + "isCorrect": true + }, + { + "answerText": "logistic loss", + "isCorrect": false + } + ] + }, + { + "questionText": "Softmax can be used to convert inputs into probabilities", + "answerOptions": [ + { + "answerText": "True", + "isCorrect": false + }, + { + "answerText": "False", + "isCorrect": true + } + ] + }, + { + "questionText": "Cross-entropy loss is a function that can calculate similarity between two arbitrary probability distributions", + "answerOptions": [ + { + "answerText": "True", + "isCorrect": true + }, + { + "answerText": "False", + "isCorrect": false + } + ] + } + ] + } ] } -] +] \ No newline at end of file diff --git a/etc/quiz-app/src/assets/translations/en/lesson-5.json b/etc/quiz-app/src/assets/translations/en/lesson-5.json new file mode 100644 index 00000000..218e50df --- /dev/null +++ b/etc/quiz-app/src/assets/translations/en/lesson-5.json @@ -0,0 +1,128 @@ +[ + { + "title": "AI for Beginners: Quizzes", + "complete": "Congratulations, you completed the quiz!", + "error": "Sorry, try again", + "quizzes": [ + { + "id": 105, + "title": "Frameworks - Pre Quiz", + "quiz": [ + { + "questionText": "Deep Neural Network training requires a lot of computations", + "answerOptions": [ + { + "answerText": "True", + "isCorrect": true + }, + { + "answerText": "False", + "isCorrect": false + } + ] + }, + { + "questionText": "Overfitting occurs because of ____", + "answerOptions": [ + { + "answerText": "Not enough testing data", + "isCorrect": false + }, + { + "answerText": "Too powerful model", + "isCorrect": true + }, + { + "answerText": "Too much noise in output data", + "isCorrect": false + } + ] + }, + { + "questionText": "Bias errors are caused by our ____ not being able to capture the relationship between training data correctly.", + "answerOptions": [ + { + "answerText": "model", + "isCorrect": false + }, + { + "answerText": "algorithm", + "isCorrect": true + }, + { + "answerText": "computer", + "isCorrect": false + } + ] + } + ] + }, + { + "id": 205, + "title": "Frameworks - Post Quiz", + "quiz": [ + { + "questionText": "After compiling our model object, we train by calling ____ function", + "answerOptions": [ + { + "answerText": "fit", + "isCorrect": true + }, + { + "answerText": "train", + "isCorrect": false + }, + { + "answerText": "teach", + "isCorrect": false + } + ] + }, + { + "questionText": "Binary cross-entropy is also called log loss", + "answerOptions": [ + { + "answerText": "True", + "isCorrect": true + }, + { + "answerText": "False", + "isCorrect": false + } + ] + }, + { + "questionText": "Tensorflow is to ____ while PyTorch is to ____", + "answerOptions": [ + { + "answerText": "Facebook, Google", + "isCorrect": false + }, + { + "answerText": "Google, Facebook", + "isCorrect": true + }, + { + "answerText": "Microsoft, Google", + "isCorrect": false + } + ] + }, + { + "questionText": "Pred is the values predicted by the network", + "answerOptions": [ + { + "answerText": "True", + "isCorrect": true + }, + { + "answerText": "False", + "isCorrect": false + } + ] + } + ] + } + ] + } +] \ No newline at end of file diff --git a/etc/quiz-src/questions.txt b/etc/quiz-src/questions-en.txt similarity index 100% rename from etc/quiz-src/questions.txt rename to etc/quiz-src/questions-en.txt diff --git a/etc/quiz-src/qzmkjson.py b/etc/quiz-src/qzmkjson.py index 90fe6cb4..01fe5999 100644 --- a/etc/quiz-src/qzmkjson.py +++ b/etc/quiz-src/qzmkjson.py @@ -1,5 +1,5 @@ -src = 'questions.txt' -dst_dir = '../quiz-app/src/assets/translations/zz' +src = 'questions-en.txt' +dst_dir = '../quiz-app/src/assets/translations/en' import json,os from copy import deepcopy @@ -50,8 +50,6 @@ for k,v in lessons.items(): lesson_content[no] = deepcopy(doc) lesson_content[no][0]['quizzes'].append(v) -print(lesson_content[1]) - with open(os.path.join(dst_dir,'index.js'),'w',encoding='utf-8') as f: for i,k in enumerate(lesson_content.keys()): f.write(f'import x{k} from "./lesson-{k}.json";\n')