Skip to content

Commit 5eaea0a

Browse files
txjackson252Trinitie Jackson
andauthored
feat: adds lesson_03 trinitiejackson quiz (#108)
* trinitie_jackson_quiz * change closed to void * change tag to element * change question and answers * add anthony_mays_quiz back * edit spacing --------- Co-authored-by: Trinitie Jackson <[email protected]>
1 parent db099e8 commit 5eaea0a

File tree

3 files changed

+91
-1
lines changed

3 files changed

+91
-1
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ quiz:
66
anotherone:
77
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
88
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
9+
trinitiejackson:
10+
- $2y$10$rAjBDhSg9FX0aHDGy4cSlO76bdyy9p5P6ibEOO.AHbxPhUJ9xCcu.
11+
- $2y$10$0nfjyM6HZyKq6To4sQ/Uvuv37qt0l6sI1hrS7EW3orVhzTwTZLLuq
12+
- $2y$10$vtxCd52gGV0lAjsP0Ox3DexP2nNKZfaClM66aRU9f1FosxjZUMkUW
13+
- $2y$10$5aphEGmaoeTKA0ojlYYYCuw8Wx9UTDAG3pVHNHYPMSwNqONcFKh/W
914
tyranrices:
1015
- $2y$10$INlO9x6lp5oQ/tAeAwfh6e3rqn3n0sLsZNTDdZQAA16Z8QCvlfhYy
1116
- $2y$10$80z8O5yb/IFhHAc0zsJ/J.dwj/mOex0kXvPxIsSEyIh4d8EA/UyJ2

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
import { Module } from '@nestjs/common';
22
import { AnotherQuiz } from './another_quiz.js';
33
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
4+
import { TrinitieJacksonQuiz } from './trinitie_jackson_quiz.js';
45
import { TyranRicesQuiz } from './tyran_rices_quiz.js';
56
import { BrooklynHardenQuiz } from './brooklyn_harden_quiz.js';
67
export const Quizzes = Symbol.for('Quizzes');
78

89
// Add your quiz provider here.
910

10-
const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz, TyranRicesQuiz, BrooklynHardenQuiz];
11+
const QUIZ_PROVIDERS = [
12+
AnthonyMaysQuiz,
13+
TrinitieJacksonQuiz,
14+
BrooklynHardenQuiz,
15+
TyranRicesQuiz,
16+
AnotherQuiz,
17+
18+
];
1119

1220
@Module({
1321
providers: [
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class TrinitieJacksonQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'trinitiejackson';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
TrinitieJacksonQuiz.makeQuestion0(),
16+
TrinitieJacksonQuiz.makeQuestion1(),
17+
TrinitieJacksonQuiz.makeQuestion2(),
18+
TrinitieJacksonQuiz.makeQuestion3(),
19+
];
20+
}
21+
22+
private static makeQuestion0(): QuizQuestion {
23+
return new MultipleChoiceQuizQuestion(
24+
0,
25+
'Where was the term "fork" coined from?',
26+
new Map<AnswerChoice, string>([
27+
[AnswerChoice.A, 'GitHub'],
28+
[AnswerChoice.B, 'Eclipse'],
29+
[AnswerChoice.C, 'XCode'],
30+
[AnswerChoice.D, 'NetBeans'],
31+
]),
32+
AnswerChoice.UNANSWERED,
33+
); // Replace `UNANSWERED` with the correct answer.
34+
}
35+
36+
private static makeQuestion1(): QuizQuestion {
37+
return new MultipleChoiceQuizQuestion(
38+
1,
39+
'In the desk analogy, what is the CPU?',
40+
new Map<AnswerChoice, string>([
41+
[AnswerChoice.A, 'motherboard'],
42+
[AnswerChoice.B, 'power supply'],
43+
[AnswerChoice.C, 'software'],
44+
[AnswerChoice.D, 'calculator'],
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 does the "cat" command do in a terminal?',
54+
new Map<AnswerChoice, string>([
55+
[AnswerChoice.A, 'copy a file or directory'],
56+
[AnswerChoice.B, 'dumps contents of a file'],
57+
[AnswerChoice.C, 'run any command'],
58+
[AnswerChoice.D, 'view the last several lines of a file'],
59+
]),
60+
AnswerChoice.UNANSWERED,
61+
); // Replace `UNANSWERED` with the correct answer.
62+
}
63+
64+
private static makeQuestion3(): QuizQuestion {
65+
return new MultipleChoiceQuizQuestion(
66+
3,
67+
'Which is NOT a void element in HTML?',
68+
new Map<AnswerChoice, string>([
69+
[AnswerChoice.A, 'img'],
70+
[AnswerChoice.B, 'input'],
71+
[AnswerChoice.C, 'br'],
72+
[AnswerChoice.D, 'p'],
73+
]),
74+
AnswerChoice.UNANSWERED,
75+
); // Replace `UNANSWERED` with the correct answer.
76+
}
77+
}

0 commit comments

Comments
 (0)