Skip to content

Commit 045ea7c

Browse files
feat: adds Karen's custom quiz (code-differently#123)
* Added and updated lesson_03 * chore: registered and tested answers in karen_alabi_quiz chore: Updated quiz module --------- Co-authored-by: Anthony D. Mays <[email protected]>
1 parent af271a4 commit 045ea7c

File tree

3 files changed

+89
-0
lines changed

3 files changed

+89
-0
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ quiz:
3434
- $2y$10$hRwUbEYSqz761B.cG79T2uYsYPiEtKu.JgD3Aj7.Mofx27TtX5YHa
3535
- $2y$10$qE/gXxpq62FEGJOJd9MDA.vpDYLTNSsZbqZLpD/0368CKkcNBzW1y
3636
- $2y$10$yI/2BgOyqQfLdHM3ixPE5uLu89su/sHRJB2c5szDFIAYXDhRakS.C
37+
karenalabi:
38+
- $2y$10$oxPNDhhyNt9BpV3g7RPmgOeQybzmsZIP5SYJkpAga6CnYbHVOqrei
39+
- $2y$10$q4dA/UIgxjzjYKK1p4MRDugTEWajBN5WAOxJflQXXI2M/8gKegXP.
40+
- $2y$10$czzmXmK7hipnM0mrjyqA/.QxgJgryPU/rNX3dof8aw2npU9BQ/4ZC
3741
montezbradley:
3842
- $2y$10$W3vj0qJcRoNY9u5GNYLddOMlwMSfHSXrTwfLMVUSDTqgQFeqLLQbG
3943
- $2y$10$Cwm6LN1BoRoAEPiVPl4lLOV3o4GY84GsQEUS3.SwBmyvOHebr2r9e
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class KarensQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'karenalabi';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
KarensQuiz.makeQuestion0(),
16+
KarensQuiz.makeQuestion1(),
17+
KarensQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What does GPU stand for?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'Graphical Processing Unit'],
27+
[AnswerChoice.B, 'Gaming Processing Unit'],
28+
[AnswerChoice.C, 'General Preserving Unit'],
29+
[AnswerChoice.D, 'George P. Underwood'],
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+
'Which of the following best describes a computer?',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, 'Karen from Spongebob'],
41+
[
42+
AnswerChoice.B,
43+
'A machine that automatically transforms input data into output data using pre-programmed instructions',
44+
],
45+
[
46+
AnswerChoice.C,
47+
'A high-tech calculator that only performs basic arithmetic operations like addition and subtraction, making it useful only for solving math problems',
48+
],
49+
[
50+
AnswerChoice.D,
51+
'A microwave with a keyboard that heats up data instead of food',
52+
],
53+
]),
54+
AnswerChoice.UNANSWERED,
55+
); // Provide the correct answer.
56+
}
57+
58+
private static makeQuestion2(): QuizQuestion {
59+
return new MultipleChoiceQuizQuestion(
60+
2,
61+
'What is the motherboard?',
62+
new Map<AnswerChoice, string>([
63+
[
64+
AnswerChoice.A,
65+
'A big chip that controls how fast your computer runs.',
66+
],
67+
[
68+
AnswerChoice.B,
69+
'The part of the computer that generates electricity to power all the other components.',
70+
],
71+
[
72+
AnswerChoice.C,
73+
'The main circuit board of a computer that houses the CPU, memory, and other essential components.',
74+
],
75+
[
76+
AnswerChoice.D,
77+
'The board that a mother uses to control the computer.',
78+
],
79+
]),
80+
AnswerChoice.UNANSWERED,
81+
);
82+
}
83+
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { EvanPhilakhongQuiz } from './evan_philakhong_quiz.js';
99
import { EzraQuiz } from './ezra_quiz.js';
1010
import { JasonWatsonQuiz } from './jason_watson_quiz.js';
1111
import { Jbeyquiz } from './jbeyquiz.js';
12+
import { KarensQuiz } from './karen_alabi_quiz.js';
1213
import { JeremiahWingQuiz } from './jeremiah_wing_quiz.js';
1314
import { KhaylaSaundersQuiz } from './khayla_quiz.js';
1415
import { MeikoStephensQuiz } from './meiko_stephens_quiz.js';
@@ -26,6 +27,7 @@ const QUIZ_PROVIDERS = [
2627
MeikoStephensQuiz,
2728
MercedesMathewsQuiz,
2829
Jbeyquiz,
30+
KarensQuiz,
2931
MontezBradleyQuiz,
3032
Bryanasingletonbarnhart,
3133
EzraQuiz,

0 commit comments

Comments
 (0)