Skip to content

Commit 678d63c

Browse files
Merge branch 'main' into dev_lesson_03
2 parents 888d506 + 830f685 commit 678d63c

File tree

5 files changed

+207
-3
lines changed

5 files changed

+207
-3
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,20 @@ quiz:
1717
anotherone:
1818
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
1919
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
20+
benjaminscott:
21+
- $2y$10$0iAVwkn0xfqhPTeVqnmmyO7g7aXGKBi66auNd0FfIQOK0pdSxeU2u
22+
- $2y$10$HantnEd1PSiBewfIt45yMeM2knNgv7mmwBiE16JctO/mu35SVdR5.
23+
- $2y$10$Jkoz9WlOAIOSvXQOTKKgfucaLCAL.Teeex3GGTA1rhek/kQEbqTXu
24+
trinitiejackson:
25+
- $2y$10$rAjBDhSg9FX0aHDGy4cSlO76bdyy9p5P6ibEOO.AHbxPhUJ9xCcu.
26+
- $2y$10$0nfjyM6HZyKq6To4sQ/Uvuv37qt0l6sI1hrS7EW3orVhzTwTZLLuq
27+
- $2y$10$vtxCd52gGV0lAjsP0Ox3DexP2nNKZfaClM66aRU9f1FosxjZUMkUW
28+
- $2y$10$5aphEGmaoeTKA0ojlYYYCuw8Wx9UTDAG3pVHNHYPMSwNqONcFKh/W
29+
tyranrices:
30+
- $2y$10$INlO9x6lp5oQ/tAeAwfh6e3rqn3n0sLsZNTDdZQAA16Z8QCvlfhYy
31+
- $2y$10$80z8O5yb/IFhHAc0zsJ/J.dwj/mOex0kXvPxIsSEyIh4d8EA/UyJ2
32+
- $2y$10$yd2QnCgk1ocCb.B03hcW..Qx6dHhg/T6CBd1SBQn8WSVo/CxxbvJe
2033
brooklynharden:
2134
- $2y$10$FMRsdjEhIG0anbZOIcVvSOy4e4eFTZGIYYyATChwc.QRMpWuomR5C
2235
- $2y$10$0AQW/94c4pPxp8xIhJUIs.qoLnUuQg/Hwe1vd4975K96EKGEPz.H6
23-
- $2y$10$ibNpd6ZjWh/yRXafaN8R5.vxbBw7KVZ7r4IsFv4Uy3naXqagr2B5W
36+
- $2y$10$ibNpd6ZjWh/yRXafaN8R5.vxbBw7KVZ7r4IsFv4Uy3naXqagr2B5W
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: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
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';
5+
import { TrinitieJacksonQuiz } from './trinitie_jackson_quiz.js';
6+
import { TyranRicesQuiz } from './tyran_rices_quiz.js';
47
import { BrooklynHardenQuiz } from './brooklyn_harden_quiz.js';
58
import { DevynBensonQuiz } from './devyn_benson_quiz.js';
69
export const Quizzes = Symbol.for('Quizzes');
710

811
// Add your quiz provider here.
912

1013
const QUIZ_PROVIDERS = [
14+
1115
AnthonyMaysQuiz,
12-
AnotherQuiz,
1316
BrooklynHardenQuiz,
14-
DevynBensonQuiz,
17+
DevynBensonQuiz,
18+
TrinitieJacksonQuiz,
19+
TyranRicesQuiz,
20+
AnotherQuiz,
21+
BenjaminScottQuiz
22+
1523
];
1624

1725
@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)