Skip to content

Commit f62fc33

Browse files
committed
adding quiz 3 questions and answers
1 parent 3f3cadf commit f62fc33

File tree

3 files changed

+64
-1
lines changed

3 files changed

+64
-1
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ quiz:
1818
- $2y$10$XcsVuO66KZiUiN75NtssdOkKvHKhuBo91JgE/TJEnSrrzbhjxuql.
1919
- $2y$10$9fZs867NHxoPQ/VWMeLyj.us5Kg3SLPcbt9O5ki/FdJ37TbhgFMFC
2020
- $2y$10$GfjcKvtzr6n8553Mdr1RJOOYDfzOudlW.3i8otsH0HiW52CU7tUAW
21+
dwightblue:
22+
- $2y$10$IpmwlGZO8Re1shIeAvYFnOK5tmzdsAWbTwUq3oTWQHVtUfloXOWeW
23+
- $2y$10$PxOTKSNTANnX8395ipDW7el3KpnADsi/g0H39V4XKCo3TrCK1ib5S
24+
- $2y$10$WYkaVdArZ7Wa5Tkw.F1tY.LY3r6t/twFYiMsCZMCwDrBtfDpROpWG
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class DwightBlueQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'dwightblue';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
DwightBlueQuiz.makeQuestion0(),
16+
DwightBlueQuiz.makeQuestion1(),
17+
DwightBlueQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What is the largest state in the USA? ',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'Texas'],
27+
[AnswerChoice.B, 'California'],
28+
[AnswerChoice.C, 'Alaska'],
29+
[AnswerChoice.D, 'New York'],
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 are you unable to write on? ',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, 'Paper'],
41+
[AnswerChoice.B, 'Notepad'],
42+
[AnswerChoice.C, 'Sand'],
43+
[AnswerChoice.D, 'Space'],
44+
]),
45+
AnswerChoice.UNANSWERED,
46+
); // Replace `UNANSWERED` with the correct answer.
47+
}
48+
49+
private static makeQuestion2(): QuizQuestion {
50+
return new QuizQuestion(
51+
2,
52+
'What did BASIC programing lanuage use to sort coding',
53+
'',
54+
);
55+
// Provide an answer.
56+
}
57+
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { Module } from '@nestjs/common';
22
import { AnotherQuiz } from './another_quiz.js';
3-
import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js';
43
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
4+
import { DwightBlueQuiz } from './dwight_blue_quiz.js';
55
import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js';
6+
import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js';
67
import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js';
78

89
export const Quizzes = Symbol.for('Quizzes');
@@ -15,6 +16,7 @@ const QUIZ_PROVIDERS = [
1516
AnotherQuiz,
1617
JosephCaballeroQuiz,
1718
OyeyemiJimohQuiz,
19+
DwightBlueQuiz,
1820
];
1921

2022
@Module({

0 commit comments

Comments
 (0)