Skip to content

Commit 830f685

Browse files
authored
feat: adds Benjamin's completed lesson 03 hw (#107)
1 parent 5eaea0a commit 830f685

File tree

3 files changed

+62
-1
lines changed

3 files changed

+62
-1
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ quiz:
66
anotherone:
77
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
88
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
9+
benjaminscott:
10+
- $2y$10$0iAVwkn0xfqhPTeVqnmmyO7g7aXGKBi66auNd0FfIQOK0pdSxeU2u
11+
- $2y$10$HantnEd1PSiBewfIt45yMeM2knNgv7mmwBiE16JctO/mu35SVdR5.
12+
- $2y$10$Jkoz9WlOAIOSvXQOTKKgfucaLCAL.Teeex3GGTA1rhek/kQEbqTXu
913
trinitiejackson:
1014
- $2y$10$rAjBDhSg9FX0aHDGy4cSlO76bdyy9p5P6ibEOO.AHbxPhUJ9xCcu.
1115
- $2y$10$0nfjyM6HZyKq6To4sQ/Uvuv37qt0l6sI1hrS7EW3orVhzTwTZLLuq
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class BenjaminScottQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'benjaminscott';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
BenjaminScottQuiz.makeQuestion0(),
16+
BenjaminScottQuiz.makeQuestion1(),
17+
BenjaminScottQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What is the command for making a new file?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'feel'],
27+
[AnswerChoice.B, 'grab'],
28+
[AnswerChoice.C, 'touch'],
29+
[AnswerChoice.D, 'poke'],
30+
]),
31+
AnswerChoice.UNANSWERED,
32+
); // Replace `UNANSWERED` with the correct answer.
33+
}
34+
35+
private static makeQuestion1(): QuizQuestion {
36+
return new QuizQuestion(
37+
1,
38+
'What does "CPU" stand for?',
39+
'Central Processing Unit',
40+
); // Provide an answer.
41+
}
42+
43+
private static makeQuestion2(): QuizQuestion {
44+
return new MultipleChoiceQuizQuestion(
45+
2,
46+
'What special operator chains commands together?',
47+
new Map<AnswerChoice, string>([
48+
[AnswerChoice.A, '&&'],
49+
[AnswerChoice.B, '--'],
50+
[AnswerChoice.C, '%$#'],
51+
[AnswerChoice.D, '**'],
52+
]),
53+
AnswerChoice.UNANSWERED,
54+
); // Replace `UNANSWERED` with the correct answer.
55+
}
56+
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Module } from '@nestjs/common';
22
import { AnotherQuiz } from './another_quiz.js';
33
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
4+
import { BenjaminScottQuiz } from './benjamin_scott_quiz.js';
45
import { TrinitieJacksonQuiz } from './trinitie_jackson_quiz.js';
56
import { TyranRicesQuiz } from './tyran_rices_quiz.js';
67
import { BrooklynHardenQuiz } from './brooklyn_harden_quiz.js';
@@ -14,7 +15,7 @@ const QUIZ_PROVIDERS = [
1415
BrooklynHardenQuiz,
1516
TyranRicesQuiz,
1617
AnotherQuiz,
17-
18+
BenjaminScottQuiz
1819
];
1920

2021
@Module({

0 commit comments

Comments
 (0)