Skip to content

Commit e43023a

Browse files
Dadenaike251Dadenaike251VicenteVigueras
authored
David Adenaike Quiz (#119)
Co-authored-by: Dadenaike251 <[email protected]> Co-authored-by: Vicente Vigueras <[email protected]>
1 parent e76bbf1 commit e43023a

File tree

3 files changed

+69
-1
lines changed

3 files changed

+69
-1
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ quiz:
1414
- $2y$10$hRwUbEYSqz761B.cG79T2uYsYPiEtKu.JgD3Aj7.Mofx27TtX5YHa
1515
- $2y$10$qE/gXxpq62FEGJOJd9MDA.vpDYLTNSsZbqZLpD/0368CKkcNBzW1y
1616
- $2y$10$yI/2BgOyqQfLdHM3ixPE5uLu89su/sHRJB2c5szDFIAYXDhRakS.C
17+
davidadenaike:
18+
- $2y$10$CCxBimjXsumkjTLWRWqibue0VeGel6Idfb/2q3y.mIuKHbkWVTsx6
19+
- $2y$10$/z0Ri9Fg7pOXUFYsOErj.Ol8Hxcy7zwqWezLTMWVtFv6tzvkCrJti
20+
- $2y$10$vQD1oc2OqiE1PkirdjQ/xu3sbrnJjwImPEwvCmP7Uk0Z1PDqQ0Mq.
1721
rmill:
1822
- $2y$10$FquR69q7W4E68TX/SNCB7u8Ri0DOFRDqsUPdGfuyIBjZJRVFkNI.6
1923
- $2y$10$FSWRA7hulVpyVxd8s67Nxuq/1cdmviW24qqoUbqihBf79cR.w9yly
20-
- $2y$10$Qy1IsNsfuJvA384ypL/72uWubUuNbMRp4LD6j/LM0RIH66D/HIjF6
24+
- $2y$10$Qy1IsNsfuJvA384ypL/72uWubUuNbMRp4LD6j/LM0RIH66D/HIjF6
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class DavidAdenaikeQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'davidadenaike';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
DavidAdenaikeQuiz.makeQuestion0(),
16+
DavidAdenaikeQuiz.makeQuestion1(),
17+
DavidAdenaikeQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What does RAM stand for?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'Rabbit, Abandon, Machinery'],
27+
[AnswerChoice.B, 'Race, Abbey, Magazine'],
28+
[AnswerChoice.C, 'Racism, Able, Magnetic'],
29+
[AnswerChoice.D, 'Random, Access Memory'],
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 does CPU stand for?',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, 'Central, Processing, Unit'],
41+
[AnswerChoice.B, 'Cabin, Pace, Umbrella'],
42+
[AnswerChoice.C, 'Cable, Pack, Unanimous'],
43+
[AnswerChoice.D, 'Cage, Pain, Uncle'],
44+
]),
45+
AnswerChoice.UNANSWERED,
46+
); // Replace `UNANSWERED` with the correct answer.
47+
}
48+
49+
private static makeQuestion2(): QuizQuestion {
50+
return new MultipleChoiceQuizQuestion(
51+
2,
52+
'What does GPU stand for?',
53+
new Map<AnswerChoice, string>([
54+
[AnswerChoice.A, 'Galaxy, Palace, Unpleasant'],
55+
[AnswerChoice.B, 'Graphics, Processing, Unit'],
56+
[AnswerChoice.C, 'Gallon, Panic, Unrest'],
57+
[AnswerChoice.D, 'Game, Parachute, Union'],
58+
]),
59+
AnswerChoice.UNANSWERED,
60+
); // Replace `UNANSWERED` with the correct answer.
61+
}
62+
}

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 { AnotherQuiz } from './another_quiz.js';
33
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
44
import { Jbeyquiz } from './jbeyquiz.js';
55
import { MercedesMathewsQuiz } from './mercedes_mathews_quiz.js';
6+
import { DavidAdenaikeQuiz } from './david_adenaike_quiz.js';
67
import { RasheedMillerQuiz } from './rasheed_miller_quiz.js';
78

89
export const Quizzes = Symbol.for('Quizzes');
@@ -13,6 +14,7 @@ const QUIZ_PROVIDERS = [
1314
AnotherQuiz,
1415
MercedesMathewsQuiz,
1516
Jbeyquiz,
17+
DavidAdenaikeQuiz,
1618
RasheedMillerQuiz,
1719
];
1820

0 commit comments

Comments
 (0)