Skip to content

Commit 64bc464

Browse files
authored
Merge branch 'main' into lesson03
2 parents 78f10ff + aa38a08 commit 64bc464

File tree

3 files changed

+68
-1
lines changed

3 files changed

+68
-1
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ quiz:
1010
- $2y$10$ANtdDzA0GAqn/QeExPO/Du8LgHUwznRLxpv0W0ib2seYk23BZowOC
1111
- $2y$10$6vAkOUmpPrUtWrh010f8e.A4M9kEzuzCrQ8ghWI9hQSEsZeGHpQ9W
1212
- $2y$10$YYTJf2QW.BJST9EUB7NZneVpNkOywIfhsWRpxIsPBg/oTmgqoYWse
13+
chigazograham:
14+
- $2y$10$OTnSih9kHykUnsuM/YKufu3MXTpOZrif.dL13XwXt8rquJL4mV.m.
15+
- $2y$10$je60MntrKRBd/1tz7hNUY.D/cyKOEM.hp6/1fVVVGJRIIitmUGI5e
16+
- $2y$10$pPTmEp0acs8.NIAamLpmmuF7B72bXFZsikHywQI/JvfXuySkhHH5S
1317
oyeyemijimoh:
1418
- $2y$10$2LlSxAEM1HmR3Wl2fO6LQueu/77spr5SuWAh4b3MKesIWNy3CFjGe
1519
- $2y$10$csA90DFxK7.uq6dSfS06Yukk5fQPrzLvU2Lp43ArTs2za28LVvRGO
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 ChigazoGrahamsQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'chigazograham';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
ChigazoGrahamsQuiz.makeQuestion0(),
16+
ChigazoGrahamsQuiz.makeQuestion1(),
17+
ChigazoGrahamsQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What is the sign for modulo?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, '^'],
27+
[AnswerChoice.B, '*'],
28+
[AnswerChoice.C, '%'],
29+
[AnswerChoice.D, '//'],
30+
]),
31+
AnswerChoice.UNANSWERED,
32+
); // Provide an answer. | AnswerChoice.C, '%'
33+
}
34+
35+
private static makeQuestion1(): QuizQuestion {
36+
return new MultipleChoiceQuizQuestion(
37+
1,
38+
'Who are hip hops big three',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, 'Kendrick Lamar, J. Cole, and Drake'],
41+
[AnswerChoice.B, 'Tupac, Biggie, and Nas'],
42+
[AnswerChoice.C, 'Kanye West, Eminem, and Lil Wayne'],
43+
[AnswerChoice.D, 'K. Dot'],
44+
]),
45+
AnswerChoice.UNANSWERED,
46+
); // Provide an answer. | AnswerChoice.C, '%'
47+
}
48+
49+
private static makeQuestion2(): QuizQuestion {
50+
return new MultipleChoiceQuizQuestion(
51+
2,
52+
'what is the answer to life, the universe, and everything else?',
53+
new Map<AnswerChoice, string>([
54+
[AnswerChoice.A, '42'],
55+
[AnswerChoice.B, 'Jesus'],
56+
[AnswerChoice.C, 'N/A'],
57+
[AnswerChoice.D, 'Whatever you want it to be!'],
58+
]),
59+
AnswerChoice.UNANSWERED,
60+
); // Provide an answer. | AnswerChoice.A, '42'
61+
}
62+
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Module } from '@nestjs/common';
22
import { AnotherQuiz } from './another_quiz.js';
33
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
44
import { DasiaEnglishQuiz } from './dasia_english_quiz.js';
5+
import { ChigazoGrahamsQuiz } from './chigazo_graham_quiz.js';
56
import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js';
67
import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js';
78
import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js';
@@ -17,8 +18,8 @@ const QUIZ_PROVIDERS = [
1718
JosephCaballeroQuiz,
1819
OyeyemiJimohQuiz,
1920
DasiaEnglishQuiz,
21+
ChigazoGrahamsQuiz
2022
];
21-
2223
@Module({
2324
providers: [
2425
...QUIZ_PROVIDERS,

0 commit comments

Comments
 (0)