Skip to content

Commit 22c2604

Browse files
committed
Hummad lesson 3 questions
1 parent 158c79d commit 22c2604

File tree

3 files changed

+48
-15
lines changed

3 files changed

+48
-15
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ quiz:
1818
- $2y$10$XcsVuO66KZiUiN75NtssdOkKvHKhuBo91JgE/TJEnSrrzbhjxuql.
1919
- $2y$10$9fZs867NHxoPQ/VWMeLyj.us5Kg3SLPcbt9O5ki/FdJ37TbhgFMFC
2020
- $2y$10$GfjcKvtzr6n8553Mdr1RJOOYDfzOudlW.3i8otsH0HiW52CU7tUAW
21+
hummadtanweer:
22+
- $2y$10$r.JmLYmaAWLZPwv6LLFWB.W823BWj7CsDaPdi5hxv4ExQyCjDq.l.
23+
- $2y$10$DcSjwFSOP.120fEp1zJgEe9J3qZiWPa0i/ofYQS6p3sG93jwCi3ci
24+
- $2y$10$O0Xy3FSVwWM3Tqeh3dP.tuv6E3OHN10siHbgJ4.iPIaZLJ1kVheC6

lesson_03/quiz/src/quizzes/hummad_tanweer_quiz.ts

Lines changed: 42 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,64 @@ import {
55
QuizQuestionProvider,
66
} from 'codedifferently-instructional';
77

8-
export class AnthonyMaysQuiz implements QuizQuestionProvider {
8+
export class HummadTanweerQuiz implements QuizQuestionProvider {
99
getProviderName(): string {
10-
return 'anthonymays';
10+
return 'hummadtanweer';
1111
}
1212

1313
makeQuizQuestions(): QuizQuestion[] {
14-
return [AnthonyMaysQuiz.makeQuestion0(), AnthonyMaysQuiz.makeQuestion1()];
14+
return [
15+
HummadTanweerQuiz.makeQuestion0(),
16+
HummadTanweerQuiz.makeQuestion1(),
17+
HummadTanweerQuiz.makeQuestion2(),
18+
];
1519
}
1620

1721
private static makeQuestion0(): QuizQuestion {
1822
return new MultipleChoiceQuizQuestion(
1923
0,
20-
'What is a multiple choice question?',
24+
'Who is attributed with inventing GIT?',
2125
new Map<AnswerChoice, string>([
22-
[AnswerChoice.A, 'A question about agency'],
23-
[AnswerChoice.B, 'The hardest kind of quiz question there is'],
26+
[AnswerChoice.A, 'Linus Torvalds'],
27+
[AnswerChoice.B, 'James Gosling'],
28+
[AnswerChoice.C, 'Koska Kawaguchi'],
29+
[AnswerChoice.D, 'Junio C. Hamano'],
30+
]),
31+
AnswerChoice.A,
32+
); // Replace `UNANSWERED` with the correct answer.
33+
}
34+
35+
private static makeQuestion1(): QuizQuestion {
36+
return new MultipleChoiceQuizQuestion(
37+
1,
38+
'What is the opposite of a GIT clone?',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, 'GIT add'],
41+
[AnswerChoice.B, 'GIT push'],
2442
[
2543
AnswerChoice.C,
26-
'A question that can be answered using one or more provided choices',
44+
'GIT upload',
2745
],
28-
[AnswerChoice.D, 'Whatever you want it to be!'],
46+
[AnswerChoice.D, 'GIT status'],
2947
]),
30-
AnswerChoice.UNANSWERED,
48+
AnswerChoice.B,
3149
); // Replace `UNANSWERED` with the correct answer.
3250
}
3351

34-
private static makeQuestion1(): QuizQuestion {
35-
return new QuizQuestion(
36-
1,
37-
'What is a computer?',
38-
'A machine that automatically transforms input into output.',
39-
); // Provide an answer.
52+
private static makeQuestion2(): QuizQuestion {
53+
return new MultipleChoiceQuizQuestion(
54+
2,
55+
'How do you check the state of your local git repository since your last commit?',
56+
new Map<AnswerChoice, string>([
57+
[AnswerChoice.A, 'GIT diff'],
58+
[AnswerChoice.B, 'GIT commit'],
59+
[
60+
AnswerChoice.C,
61+
'GIT status',
62+
],
63+
[AnswerChoice.D, 'GIT check'],
64+
]),
65+
AnswerChoice.C,
66+
); // Replace `UNANSWERED` with the correct answer.
4067
}
4168
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js';
44
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
55
import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js';
66
import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js';
7+
import { HummadTanweerQuiz } from './hummad_tanweer_quiz.js';
78

89
export const Quizzes = Symbol.for('Quizzes');
910

@@ -15,6 +16,7 @@ const QUIZ_PROVIDERS = [
1516
AnotherQuiz,
1617
JosephCaballeroQuiz,
1718
OyeyemiJimohQuiz,
19+
HummadTanweerQuiz
1820
];
1921

2022
@Module({

0 commit comments

Comments
 (0)