Skip to content

Commit df2f77f

Browse files
authored
Merge branch 'main' into feat/lesson-03/quiz
2 parents 2524e80 + bfaccb6 commit df2f77f

File tree

6 files changed

+279
-1
lines changed

6 files changed

+279
-1
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,24 @@ quiz:
1212
- $2y$10$ONEdMxmf7aUg.1p/PGhAfOIaRyNoFepaoRqpCnR//JLdJETXNKuzK
1313
- $2y$10$.mzip.DvXRpm0CU3T6nQOuiq82J1HnWnBc.uMLfAEPZp76Y6mB5Ei
1414

15+
danielsonadjocy:
16+
- $2y$13$a2VPLkXi0XoTkCgytHabiuFX36ezOtQvSgG8Fjonlp.FYsgDnMQ1S
17+
- $2y$10$z37Nf6Ay1CZrbb3OtmhaXuFGnOqiUgAEc6CThl3iUAVFE3kEYS/cq
18+
- $2y$10$z37Nf6Ay1CZrbb3OtmhaXuFGnOqiUgAEc6CThl3iUAVFE3kEYS/cq
19+
benjaminscott:
20+
- $2y$10$0iAVwkn0xfqhPTeVqnmmyO7g7aXGKBi66auNd0FfIQOK0pdSxeU2u
21+
- $2y$10$HantnEd1PSiBewfIt45yMeM2knNgv7mmwBiE16JctO/mu35SVdR5.
22+
- $2y$10$Jkoz9WlOAIOSvXQOTKKgfucaLCAL.Teeex3GGTA1rhek/kQEbqTXu
23+
trinitiejackson:
24+
- $2y$10$rAjBDhSg9FX0aHDGy4cSlO76bdyy9p5P6ibEOO.AHbxPhUJ9xCcu.
25+
- $2y$10$0nfjyM6HZyKq6To4sQ/Uvuv37qt0l6sI1hrS7EW3orVhzTwTZLLuq
26+
- $2y$10$vtxCd52gGV0lAjsP0Ox3DexP2nNKZfaClM66aRU9f1FosxjZUMkUW
27+
- $2y$10$5aphEGmaoeTKA0ojlYYYCuw8Wx9UTDAG3pVHNHYPMSwNqONcFKh/W
28+
tyranrices:
29+
- $2y$10$INlO9x6lp5oQ/tAeAwfh6e3rqn3n0sLsZNTDdZQAA16Z8QCvlfhYy
30+
- $2y$10$80z8O5yb/IFhHAc0zsJ/J.dwj/mOex0kXvPxIsSEyIh4d8EA/UyJ2
31+
- $2y$10$yd2QnCgk1ocCb.B03hcW..Qx6dHhg/T6CBd1SBQn8WSVo/CxxbvJe
32+
1533
brooklynharden:
1634
- $2y$10$FMRsdjEhIG0anbZOIcVvSOy4e4eFTZGIYYyATChwc.QRMpWuomR5C
1735
- $2y$10$0AQW/94c4pPxp8xIhJUIs.qoLnUuQg/Hwe1vd4975K96EKGEPz.H6
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+
}
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: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
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 { DanielBoyceQuiz } from './daniel_boyce_quiz.js';
6+
import { BenjaminScottQuiz } from './benjamin_scott_quiz.js';
7+
import { TrinitieJacksonQuiz } from './trinitie_jackson_quiz.js';
8+
import { TyranRicesQuiz } from './tyran_rices_quiz.js';
59
import { BrooklynHardenQuiz } from './brooklyn_harden_quiz.js';
610
export const Quizzes = Symbol.for('Quizzes');
711

812
// Add your quiz provider here.
913

1014

11-
const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz, BrooklynHardenQuiz,DanielBoyceQuiz];
15+
16+
const QUIZ_PROVIDERS = [
17+
AnthonyMaysQuiz,
18+
TrinitieJacksonQuiz,
19+
BrooklynHardenQuiz,
20+
TyranRicesQuiz,
21+
AnotherQuiz,
22+
BenjaminScottQuiz,
23+
DanielsonAdjocyQuiz,
24+
DanielBoyceQuiz
25+
];
1226

1327

1428
@Module({
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+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class TyranRicesQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'tyranrices';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
TyranRicesQuiz.makeQuestion0(),
16+
TyranRicesQuiz.makeQuestion1(),
17+
TyranRicesQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What keyword do you use for introducing a new feature in comment name conventions?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'chore:'],
27+
[AnswerChoice.B, 'doc:'],
28+
[AnswerChoice.C, 'feat:'],
29+
[AnswerChoice.D, 'fix:'],
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 GPU stand for?',
39+
'Graphics Processing Unit.',
40+
); // Provide an answer.
41+
}
42+
43+
private static makeQuestion2(): QuizQuestion {
44+
return new QuizQuestion(
45+
2,
46+
'What does PR stand for in the context of software development?',
47+
'Pull Request.',
48+
); // Provide an answer.
49+
}
50+
}

0 commit comments

Comments
 (0)