Skip to content

Commit 66a71bc

Browse files
committed
feat: create a Tommy_Tran_quiz.ts and added answers
1 parent de452f0 commit 66a71bc

File tree

3 files changed

+72
-5
lines changed

3 files changed

+72
-5
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ quiz:
66
anotherone:
77
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
88
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
9-
dasiaenglish:
9+
dasiaenglish:
1010
- $2y$10$ANtdDzA0GAqn/QeExPO/Du8LgHUwznRLxpv0W0ib2seYk23BZowOC
1111
- $2y$10$6vAkOUmpPrUtWrh010f8e.A4M9kEzuzCrQ8ghWI9hQSEsZeGHpQ9W
1212
- $2y$10$YYTJf2QW.BJST9EUB7NZneVpNkOywIfhsWRpxIsPBg/oTmgqoYWse
@@ -34,4 +34,7 @@ quiz:
3434
- $2y$10$QsN9VkjWORsKgZRiBT46VOUgc5HVnswKAT4uDbs7JYbTF7DdKbsw.
3535
- $2y$10$sqXEOL0L8o0kRyiAb.2s4u0RlBC2.LmOGDbGWXHj5IfBNwinkv2yq
3636
- $2y$10$HaWueXgrIzd7z8yf39HfVeTjjyr.Kgx0GFBqwCRSzW3zRSreN19yi
37-
37+
tommytran:
38+
- $2y$10$6Mf9m8JXRHUyCgRNPn4nceimRZVOhtmsZbOGoFnI4ZJp..RluHmwy
39+
- $2y$10$Xr6W53IVq52orDvf6.TQQuXeMGaysQdgAu1cm5DYi1NyCskG2ByPe
40+
- $2y$10$x8BG/EcIbVohTU1s/thyc.TIzlfc8f/aVZaD4/1yMpcks2OWzKKMe
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class TommyTranQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'tommytran';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
TommyTranQuiz.makeQuestion0(),
16+
TommyTranQuiz.makeQuestion1(),
17+
TommyTranQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What is the capital city of Japan?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'Seoul'],
27+
[AnswerChoice.B, 'Tokyo'],
28+
[AnswerChoice.C, 'Beijing'],
29+
[AnswerChoice.D, 'Bangkok'],
30+
]),
31+
AnswerChoice.B,
32+
); // Replace `UNANSWERED` with the correct answer.
33+
}
34+
35+
private static makeQuestion1(): QuizQuestion {
36+
return new MultipleChoiceQuizQuestion(
37+
1,
38+
'Which planet is known as the "Red Planet?',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, 'Venus'],
41+
[AnswerChoice.B, 'Jupiter'],
42+
[AnswerChoice.C, 'Mars'],
43+
[AnswerChoice.D, 'Saturn'],
44+
]),
45+
AnswerChoice.C,
46+
); // Replace `UNANSWERED` with the correct answer.
47+
}
48+
49+
private static makeQuestion2(): QuizQuestion {
50+
return new MultipleChoiceQuizQuestion(
51+
2,
52+
'Who wrote the play "Romeo and Juliet?',
53+
new Map<AnswerChoice, string>([
54+
[AnswerChoice.A, 'Charles Dickens'],
55+
[AnswerChoice.B, 'William Shakespeare'],
56+
[AnswerChoice.C, 'Jane Austen'],
57+
[AnswerChoice.D, 'Mark Twain'],
58+
]),
59+
AnswerChoice.B,
60+
); // Replace `UNANSWERED` with the correct answer.
61+
}
62+
}

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import { Module } from '@nestjs/common';
2+
import { AmiyahJonesQuiz } from './amiyah_jones_quiz.js';
23
import { AngelicaCQuiz } from './angelica_c_quiz.js';
34
import { AnotherQuiz } from './another_quiz.js';
45
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
5-
import { DasiaEnglishQuiz } from './dasia_english_quiz.js';
66
import { ChigazoGrahamsQuiz } from './chigazo_graham_quiz.js';
7+
import { DasiaEnglishQuiz } from './dasia_english_quiz.js';
78
import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js';
89
import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js';
10+
import { TommyTranQuiz } from './Tommy_Tran_quiz.js';
911
import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js';
10-
import { AmiyahJonesQuiz } from './amiyah_jones_quiz.js';
1112

1213
export const Quizzes = Symbol.for('Quizzes');
1314

@@ -22,7 +23,8 @@ const QUIZ_PROVIDERS = [
2223
OyeyemiJimohQuiz,
2324
DasiaEnglishQuiz,
2425
ChigazoGrahamsQuiz,
25-
AmiyahJonesQuiz
26+
AmiyahJonesQuiz,
27+
TommyTranQuiz,
2628
];
2729

2830
@Module({

0 commit comments

Comments
 (0)