Skip to content

Commit 4371191

Browse files
committed
chore(quizzes): merges conflict files, adds Trinitie's & Benjamin's Quizzes.
2 parents 6d3c662 + 830f685 commit 4371191

File tree

4 files changed

+153
-1
lines changed

4 files changed

+153
-1
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ 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
13+
trinitiejackson:
14+
- $2y$10$rAjBDhSg9FX0aHDGy4cSlO76bdyy9p5P6ibEOO.AHbxPhUJ9xCcu.
15+
- $2y$10$0nfjyM6HZyKq6To4sQ/Uvuv37qt0l6sI1hrS7EW3orVhzTwTZLLuq
16+
- $2y$10$vtxCd52gGV0lAjsP0Ox3DexP2nNKZfaClM66aRU9f1FosxjZUMkUW
17+
- $2y$10$5aphEGmaoeTKA0ojlYYYCuw8Wx9UTDAG3pVHNHYPMSwNqONcFKh/W
918
tyranrices:
1019
- $2y$10$INlO9x6lp5oQ/tAeAwfh6e3rqn3n0sLsZNTDdZQAA16Z8QCvlfhYy
1120
- $2y$10$80z8O5yb/IFhHAc0zsJ/J.dwj/mOex0kXvPxIsSEyIh4d8EA/UyJ2
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: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
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';
46
import { TyranRicesQuiz } from './tyran_rices_quiz.js';
57
import { BrooklynHardenQuiz } from './brooklyn_harden_quiz.js';
68
import { TaliaCrockettQuiz } from './talia_crockett_quiz.js';
79
export const Quizzes = Symbol.for('Quizzes');
810

911
// Add your quiz provider here.
1012

11-
const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz, TyranRicesQuiz, BrooklynHardenQuiz, TaliaCrockettQuiz];
13+
const QUIZ_PROVIDERS = [
14+
AnthonyMaysQuiz,
15+
TrinitieJacksonQuiz,
16+
BrooklynHardenQuiz,
17+
TyranRicesQuiz,
18+
AnotherQuiz,
19+
BenjaminScottQuiz
20+
TaliaCrockettQuiz,
21+
];
1222

1323
@Module({
1424
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)