Skip to content

Commit 218001f

Browse files
author
“A1-4U2T1NN”
committed
feat: added my lesson 03 quiz; updated quiz.yaml; modified quizzes.module.ts;
1 parent de19403 commit 218001f

File tree

3 files changed

+66
-2
lines changed

3 files changed

+66
-2
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ quiz:
66
anotherone:
77
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
88
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
9+
chigazograham:
10+
- $2y$10$OTnSih9kHykUnsuM/YKufu3MXTpOZrif.dL13XwXt8rquJL4mV.m.
11+
- $2y$10$je60MntrKRBd/1tz7hNUY.D/cyKOEM.hp6/1fVVVGJRIIitmUGI5e
12+
- $2y$10$pPTmEp0acs8.NIAamLpmmuF7B72bXFZsikHywQI/JvfXuySkhHH5S
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class ChigazoGrahamsQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'chigazograham';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [ChigazoGrahamsQuiz.makeQuestion1(), ChigazoGrahamsQuiz.makeQuestion2, ChigazoGrahamsQuiz.makeQuestion3()];
15+
}
16+
17+
private static makeQuestion1(): QuizQuestion {
18+
return new MultipleChoiceQuizQuestion(
19+
1,
20+
'What is the sign for Modulo?',
21+
new Map<AnswerChoice, string>([
22+
[AnswerChoice.A, '^'],
23+
[AnswerChoice.B, '*'],
24+
[AnswerChoice.C,'%',],
25+
[AnswerChoice.D, '//'],
26+
]),
27+
AnswerChoice.UNANSWERED,
28+
); // Provide an answer. | AnswerChoice.C, '%'
29+
}
30+
31+
private static makeQuestion2(): QuizQuestion {
32+
return new QuizQuestion(
33+
2,
34+
'Who is are big three in hip hop?',
35+
'A machine that automatically transforms input into output.',
36+
new Map<AnswerChoice, string>([
37+
[AnswerChoice.A, 'Kendrick Lamar, J. Cole, and Drake'],
38+
[AnswerChoice.B, 'Tupac, Biggie, and Nas'],
39+
[AnswerChoice.C, 'Kanye West, Eminem, and Lil Wayne',],
40+
[AnswerChoice.D, 'K. Dot'],
41+
]),
42+
AnswerChoice.UNANSWERED,
43+
); // Provide an answer. | AnswerChoice.D, 'K. Dot'
44+
}
45+
46+
private static makeQuestion3(): QuizQuestion {
47+
return new MultipleChoiceQuizQuestion(
48+
3,
49+
'what is the answer to life, the universe, and everything else?',
50+
new Map<AnswerChoice, string>([
51+
[AnswerChoice.A, '42'],
52+
[AnswerChoice.B, 'Jesus'],
53+
[AnswerChoice.C,'N/A'],
54+
[AnswerChoice.D, 'Whatever you want it to be!'],
55+
]),
56+
AnswerChoice.UNANSWERED,
57+
); // Provide an answer. | AnswerChoice.A, '42'
58+
}
59+
60+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { Module } from '@nestjs/common';
1+
import { ChigazoGrahamsQuiz } from './chigazo_graham_quiz.js';
22
import { AnotherQuiz } from './another_quiz.js';
33
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
44

55
export const Quizzes = Symbol.for('Quizzes');
66

77
// Add your quiz provider here.
8-
const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz];
8+
const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz, ChigazoGrahamsQuiz];
99

1010
@Module({
1111
providers: [

0 commit comments

Comments
 (0)