Skip to content

Commit bfaccb6

Browse files
DaFDE31Danielson Adjocy
andauthored
feat: adds Danielson Adjocy's lesson_03 quiz (#111)
* Added files * update * update * update * update * update * update * update * ”update” * finished README * fix:fixing chhange requests * feat: add work email * feat: added test and passing * chore:updating * Update quiz.yaml * Update quiz.yaml * revert: reverted another_quiz.ts * Update quiz.yaml * fix: quizzes.module.ts --------- Co-authored-by: Danielson Adjocy <[email protected]>
1 parent 830f685 commit bfaccb6

File tree

3 files changed

+75
-2
lines changed

3 files changed

+75
-2
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 5 additions & 1 deletion
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+
danielsonadjocy:
10+
- $2y$13$a2VPLkXi0XoTkCgytHabiuFX36ezOtQvSgG8Fjonlp.FYsgDnMQ1S
11+
- $2y$10$z37Nf6Ay1CZrbb3OtmhaXuFGnOqiUgAEc6CThl3iUAVFE3kEYS/cq
12+
- $2y$10$z37Nf6Ay1CZrbb3OtmhaXuFGnOqiUgAEc6CThl3iUAVFE3kEYS/cq
913
benjaminscott:
1014
- $2y$10$0iAVwkn0xfqhPTeVqnmmyO7g7aXGKBi66auNd0FfIQOK0pdSxeU2u
1115
- $2y$10$HantnEd1PSiBewfIt45yMeM2knNgv7mmwBiE16JctO/mu35SVdR5.
@@ -22,4 +26,4 @@ quiz:
2226
brooklynharden:
2327
- $2y$10$FMRsdjEhIG0anbZOIcVvSOy4e4eFTZGIYYyATChwc.QRMpWuomR5C
2428
- $2y$10$0AQW/94c4pPxp8xIhJUIs.qoLnUuQg/Hwe1vd4975K96EKGEPz.H6
25-
- $2y$10$ibNpd6ZjWh/yRXafaN8R5.vxbBw7KVZ7r4IsFv4Uy3naXqagr2B5W
29+
- $2y$10$ibNpd6ZjWh/yRXafaN8R5.vxbBw7KVZ7r4IsFv4Uy3naXqagr2B5W
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class DanielsonAdjocyQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'danielsonadjocy';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
DanielsonAdjocyQuiz.makeQuestion0(),
16+
DanielsonAdjocyQuiz.makeQuestion1(),
17+
DanielsonAdjocyQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What should go first in a pc frame?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'CPU'],
27+
[AnswerChoice.B, 'GPU'],
28+
[
29+
AnswerChoice.C,
30+
'Motherboard',
31+
],
32+
[AnswerChoice.D, 'Power supply'],
33+
]),
34+
AnswerChoice.UNANSWERED,
35+
); // Replace `UNANSWERED` with the correct answer.
36+
}
37+
38+
private static makeQuestion1(): QuizQuestion {
39+
return new MultipleChoiceQuizQuestion(
40+
1,
41+
'True or False: Data in a computer is represented by Binary, Decimal, and Hexadecimal',
42+
new Map<AnswerChoice, string>([
43+
[AnswerChoice.A, 'True'],
44+
[AnswerChoice.B, 'False'],
45+
]),
46+
AnswerChoice.UNANSWERED,
47+
); // Replace `UNANSWERED` with the correct answer.
48+
}
49+
50+
private static makeQuestion2(): QuizQuestion {
51+
return new MultipleChoiceQuizQuestion(
52+
2,
53+
'What is the brain of the computer?',
54+
new Map<AnswerChoice, string>([
55+
[AnswerChoice.A, 'CPU'],
56+
[AnswerChoice.B, 'GPU'],
57+
[AnswerChoice.C, 'Motherboard'],
58+
[AnswerChoice.D, 'Power supply'],
59+
]),
60+
AnswerChoice.UNANSWERED,
61+
); // Replace `UNANSWERED` with the correct answer.
62+
}
63+
}

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Module } from '@nestjs/common';
2+
import { DanielsonAdjocyQuiz } from './danielson_adjocys_quiz.js';
23
import { AnotherQuiz } from './another_quiz.js';
34
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
45
import { BenjaminScottQuiz } from './benjamin_scott_quiz.js';
@@ -9,15 +10,20 @@ export const Quizzes = Symbol.for('Quizzes');
910

1011
// Add your quiz provider here.
1112

13+
14+
15+
1216
const QUIZ_PROVIDERS = [
1317
AnthonyMaysQuiz,
1418
TrinitieJacksonQuiz,
1519
BrooklynHardenQuiz,
1620
TyranRicesQuiz,
1721
AnotherQuiz,
18-
BenjaminScottQuiz
22+
BenjaminScottQuiz,
23+
DanielsonAdjocyQuiz
1924
];
2025

26+
2127
@Module({
2228
providers: [
2329
...QUIZ_PROVIDERS,

0 commit comments

Comments
 (0)