Skip to content

Commit 082a350

Browse files
committed
Hummad lesson 3 questions
1 parent 4f33d4d commit 082a350

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
@@ -64,3 +64,7 @@ quiz:
6464
- $2y$10$dkWnar/ZXMr9ndtRDcbTbe/HN3DhuULPoZhTx/xATi.UYQ0DUIx1W
6565
- $2y$10$.Cw9Sjf6Pf9K8EsThegQ5e8BMoJdLl40CCuJ2FKHLar1k8hVfR9fu
6666
- $2y$10$.pmOuTs0Oqjfhn9mMIQCQu7Fbe1ZOZmZIbTGqqul.hnVLqIV6bn/W
67+
hummadtanweer:
68+
- $2y$10$r.JmLYmaAWLZPwv6LLFWB.W823BWj7CsDaPdi5hxv4ExQyCjDq.l.
69+
- $2y$10$DcSjwFSOP.120fEp1zJgEe9J3qZiWPa0i/ofYQS6p3sG93jwCi3ci
70+
- $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
@@ -15,6 +15,7 @@ import { TommyTranQuiz } from './tommy.tran.quiz.js';
1515
import { XavierCruzQuiz } from './xavier_cruz_quiz.js';
1616
import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js';
1717
import { ZionBuchananQuiz } from './zion_buchanan_quiz.js';
18+
import { HummadTanweerQuiz } from './hummad_tanweer_quiz.js';
1819

1920
export const Quizzes = Symbol.for('Quizzes');
2021

@@ -36,6 +37,7 @@ const QUIZ_PROVIDERS = [
3637
ZionBuchananQuiz,
3738
ChelseaOgbonniaQuiz,
3839
TommyTranQuiz,
40+
HummadTanweerQuiz
3941
];
4042

4143
@Module({

0 commit comments

Comments
 (0)