Skip to content

Commit d587d16

Browse files
Dasiamemarleomac3
authored andcommitted
feat: adds Dasia's quiz questions (code-differently#114)
* feat: Dasia quizz questions * fix: duplicate declaration * Fix: capitalization * Forgot to delete a line * duplicate name
1 parent 7dc5f77 commit d587d16

File tree

3 files changed

+73
-0
lines changed

3 files changed

+73
-0
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ quiz:
66
anotherone:
77
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
88
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
9+
dasiaenglish:
10+
- $2y$10$ANtdDzA0GAqn/QeExPO/Du8LgHUwznRLxpv0W0ib2seYk23BZowOC
11+
- $2y$10$6vAkOUmpPrUtWrh010f8e.A4M9kEzuzCrQ8ghWI9hQSEsZeGHpQ9W
12+
- $2y$10$YYTJf2QW.BJST9EUB7NZneVpNkOywIfhsWRpxIsPBg/oTmgqoYWse
913
chigazograham:
1014
- $2y$10$OTnSih9kHykUnsuM/YKufu3MXTpOZrif.dL13XwXt8rquJL4mV.m.
1115
- $2y$10$je60MntrKRBd/1tz7hNUY.D/cyKOEM.hp6/1fVVVGJRIIitmUGI5e
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class DasiaEnglishQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'dasiaenglish';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
DasiaEnglishQuiz.makeQuestion0(),
16+
DasiaEnglishQuiz.makeQuestion1(),
17+
DasiaEnglishQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'How often should you sync your fork?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'Never'],
27+
[AnswerChoice.B, 'Once a day'],
28+
[AnswerChoice.C, 'About every hour or as often as possible'],
29+
[AnswerChoice.D, 'Once a week'],
30+
]),
31+
AnswerChoice.UNANSWERED,
32+
); // Replace `UNANSWERED` with the correct answer.
33+
}
34+
35+
private static makeQuestion1(): QuizQuestion {
36+
return new MultipleChoiceQuizQuestion(
37+
1,
38+
'What is a computer?',
39+
new Map<AnswerChoice, string>([
40+
[
41+
AnswerChoice.A,
42+
'A machine that transforms input to output data using automatically executed pre-programmed instructions',
43+
],
44+
[AnswerChoice.B, 'A machine'],
45+
[AnswerChoice.C, 'A laptop'],
46+
[
47+
AnswerChoice.D,
48+
'A machine that automatically executed pre-programmed instructions',
49+
],
50+
]),
51+
AnswerChoice.UNANSWERED,
52+
); // Replace `UNANSWERED` with the correct answer.
53+
}
54+
private static makeQuestion2(): QuizQuestion {
55+
return new MultipleChoiceQuizQuestion(
56+
2,
57+
'What part of the computer does everything have to run through?',
58+
new Map<AnswerChoice, string>([
59+
[AnswerChoice.A, 'CPU'],
60+
[AnswerChoice.B, 'GPU'],
61+
[AnswerChoice.C, 'RAM'],
62+
[AnswerChoice.D, 'Motherboard'],
63+
]),
64+
AnswerChoice.UNANSWERED,
65+
); // Replace `UNANSWERED` with the correct answer.
66+
}
67+
}

lesson_03/quiz/src/quizzes/quizzes.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { AmiyahJonesQuiz } from './amiyah_jones_quiz.js';
33
import { AnotherQuiz } from './another_quiz.js';
44
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
55
import { ChigazoGrahamsQuiz } from './chigazo_graham_quiz.js';
6+
import { DasiaEnglishQuiz } from './dasia_english_quiz.js';
67
import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js';
78
import { LjMcwilliamsQuiz } from './lj_mcwilliams_quiz.js';
89
import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js';
@@ -18,6 +19,7 @@ const QUIZ_PROVIDERS = [
1819
AnotherQuiz,
1920
JosephCaballeroQuiz,
2021
OyeyemiJimohQuiz,
22+
DasiaEnglishQuiz,
2123
ChigazoGrahamsQuiz,
2224
AmiyahJonesQuiz,
2325
LjMcwilliamsQuiz,

0 commit comments

Comments
 (0)