From 158c79dd4caab1ec7154ffab8a798197934de6dc Mon Sep 17 00:00:00 2001 From: htanweer244 Date: Tue, 1 Oct 2024 14:39:11 +0000 Subject: [PATCH 1/4] Created new branch --- .../quiz/src/quizzes/hummad_tanweer_quiz.ts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 lesson_03/quiz/src/quizzes/hummad_tanweer_quiz.ts diff --git a/lesson_03/quiz/src/quizzes/hummad_tanweer_quiz.ts b/lesson_03/quiz/src/quizzes/hummad_tanweer_quiz.ts new file mode 100644 index 00000000..39d3f206 --- /dev/null +++ b/lesson_03/quiz/src/quizzes/hummad_tanweer_quiz.ts @@ -0,0 +1,41 @@ +import { + AnswerChoice, + MultipleChoiceQuizQuestion, + QuizQuestion, + QuizQuestionProvider, +} from 'codedifferently-instructional'; + +export class AnthonyMaysQuiz implements QuizQuestionProvider { + getProviderName(): string { + return 'anthonymays'; + } + + makeQuizQuestions(): QuizQuestion[] { + return [AnthonyMaysQuiz.makeQuestion0(), AnthonyMaysQuiz.makeQuestion1()]; + } + + private static makeQuestion0(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 0, + 'What is a multiple choice question?', + new Map([ + [AnswerChoice.A, 'A question about agency'], + [AnswerChoice.B, 'The hardest kind of quiz question there is'], + [ + AnswerChoice.C, + 'A question that can be answered using one or more provided choices', + ], + [AnswerChoice.D, 'Whatever you want it to be!'], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } + + private static makeQuestion1(): QuizQuestion { + return new QuizQuestion( + 1, + 'What is a computer?', + 'A machine that automatically transforms input into output.', + ); // Provide an answer. + } +} From 22c2604b19c01d302357e8c647f5e5ee1d56809b Mon Sep 17 00:00:00 2001 From: htanweer244 Date: Tue, 1 Oct 2024 15:49:30 +0000 Subject: [PATCH 2/4] Hummad lesson 3 questions --- lesson_03/quiz/quiz.yaml | 4 ++ .../quiz/src/quizzes/hummad_tanweer_quiz.ts | 57 ++++++++++++++----- lesson_03/quiz/src/quizzes/quizzes.module.ts | 2 + 3 files changed, 48 insertions(+), 15 deletions(-) diff --git a/lesson_03/quiz/quiz.yaml b/lesson_03/quiz/quiz.yaml index b5827ea5..77d6d2fb 100644 --- a/lesson_03/quiz/quiz.yaml +++ b/lesson_03/quiz/quiz.yaml @@ -18,3 +18,7 @@ quiz: - $2y$10$XcsVuO66KZiUiN75NtssdOkKvHKhuBo91JgE/TJEnSrrzbhjxuql. - $2y$10$9fZs867NHxoPQ/VWMeLyj.us5Kg3SLPcbt9O5ki/FdJ37TbhgFMFC - $2y$10$GfjcKvtzr6n8553Mdr1RJOOYDfzOudlW.3i8otsH0HiW52CU7tUAW + hummadtanweer: + - $2y$10$r.JmLYmaAWLZPwv6LLFWB.W823BWj7CsDaPdi5hxv4ExQyCjDq.l. + - $2y$10$DcSjwFSOP.120fEp1zJgEe9J3qZiWPa0i/ofYQS6p3sG93jwCi3ci + - $2y$10$O0Xy3FSVwWM3Tqeh3dP.tuv6E3OHN10siHbgJ4.iPIaZLJ1kVheC6 \ No newline at end of file diff --git a/lesson_03/quiz/src/quizzes/hummad_tanweer_quiz.ts b/lesson_03/quiz/src/quizzes/hummad_tanweer_quiz.ts index 39d3f206..1f20402a 100644 --- a/lesson_03/quiz/src/quizzes/hummad_tanweer_quiz.ts +++ b/lesson_03/quiz/src/quizzes/hummad_tanweer_quiz.ts @@ -5,37 +5,64 @@ import { QuizQuestionProvider, } from 'codedifferently-instructional'; -export class AnthonyMaysQuiz implements QuizQuestionProvider { +export class HummadTanweerQuiz implements QuizQuestionProvider { getProviderName(): string { - return 'anthonymays'; + return 'hummadtanweer'; } makeQuizQuestions(): QuizQuestion[] { - return [AnthonyMaysQuiz.makeQuestion0(), AnthonyMaysQuiz.makeQuestion1()]; + return [ + HummadTanweerQuiz.makeQuestion0(), + HummadTanweerQuiz.makeQuestion1(), + HummadTanweerQuiz.makeQuestion2(), + ]; } private static makeQuestion0(): QuizQuestion { return new MultipleChoiceQuizQuestion( 0, - 'What is a multiple choice question?', + 'Who is attributed with inventing GIT?', new Map([ - [AnswerChoice.A, 'A question about agency'], - [AnswerChoice.B, 'The hardest kind of quiz question there is'], + [AnswerChoice.A, 'Linus Torvalds'], + [AnswerChoice.B, 'James Gosling'], + [AnswerChoice.C, 'Koska Kawaguchi'], + [AnswerChoice.D, 'Junio C. Hamano'], + ]), + AnswerChoice.A, + ); // Replace `UNANSWERED` with the correct answer. + } + + private static makeQuestion1(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 1, + 'What is the opposite of a GIT clone?', + new Map([ + [AnswerChoice.A, 'GIT add'], + [AnswerChoice.B, 'GIT push'], [ AnswerChoice.C, - 'A question that can be answered using one or more provided choices', + 'GIT upload', ], - [AnswerChoice.D, 'Whatever you want it to be!'], + [AnswerChoice.D, 'GIT status'], ]), - AnswerChoice.UNANSWERED, + AnswerChoice.B, ); // Replace `UNANSWERED` with the correct answer. } - private static makeQuestion1(): QuizQuestion { - return new QuizQuestion( - 1, - 'What is a computer?', - 'A machine that automatically transforms input into output.', - ); // Provide an answer. + private static makeQuestion2(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 2, + 'How do you check the state of your local git repository since your last commit?', + new Map([ + [AnswerChoice.A, 'GIT diff'], + [AnswerChoice.B, 'GIT commit'], + [ + AnswerChoice.C, + 'GIT status', + ], + [AnswerChoice.D, 'GIT check'], + ]), + AnswerChoice.C, + ); // Replace `UNANSWERED` with the correct answer. } } diff --git a/lesson_03/quiz/src/quizzes/quizzes.module.ts b/lesson_03/quiz/src/quizzes/quizzes.module.ts index 0d6a5832..35eba3ff 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -4,6 +4,7 @@ import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js'; import { AnthonyMaysQuiz } from './anthony_mays_quiz.js'; import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js'; import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js'; +import { HummadTanweerQuiz } from './hummad_tanweer_quiz.js'; export const Quizzes = Symbol.for('Quizzes'); @@ -15,6 +16,7 @@ const QUIZ_PROVIDERS = [ AnotherQuiz, JosephCaballeroQuiz, OyeyemiJimohQuiz, + HummadTanweerQuiz ]; @Module({ From edad89d6ec2cb357c49fbbd53996ae09b8762271 Mon Sep 17 00:00:00 2001 From: htanweer244 Date: Wed, 2 Oct 2024 14:29:13 +0000 Subject: [PATCH 3/4] changed my answers to "unanswered" --- .../quiz/src/quizzes/hummad_tanweer_quiz.ts | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/lesson_03/quiz/src/quizzes/hummad_tanweer_quiz.ts b/lesson_03/quiz/src/quizzes/hummad_tanweer_quiz.ts index 1f20402a..d3ae0c39 100644 --- a/lesson_03/quiz/src/quizzes/hummad_tanweer_quiz.ts +++ b/lesson_03/quiz/src/quizzes/hummad_tanweer_quiz.ts @@ -28,7 +28,7 @@ export class HummadTanweerQuiz implements QuizQuestionProvider { [AnswerChoice.C, 'Koska Kawaguchi'], [AnswerChoice.D, 'Junio C. Hamano'], ]), - AnswerChoice.A, + AnswerChoice.UNANSWERED, ); // Replace `UNANSWERED` with the correct answer. } @@ -39,13 +39,10 @@ export class HummadTanweerQuiz implements QuizQuestionProvider { new Map([ [AnswerChoice.A, 'GIT add'], [AnswerChoice.B, 'GIT push'], - [ - AnswerChoice.C, - 'GIT upload', - ], + [AnswerChoice.C, 'GIT upload'], [AnswerChoice.D, 'GIT status'], ]), - AnswerChoice.B, + AnswerChoice.UNANSWERED, ); // Replace `UNANSWERED` with the correct answer. } @@ -56,13 +53,10 @@ export class HummadTanweerQuiz implements QuizQuestionProvider { new Map([ [AnswerChoice.A, 'GIT diff'], [AnswerChoice.B, 'GIT commit'], - [ - AnswerChoice.C, - 'GIT status', - ], + [AnswerChoice.C, 'GIT status'], [AnswerChoice.D, 'GIT check'], ]), - AnswerChoice.C, + AnswerChoice.UNANSWERED, ); // Replace `UNANSWERED` with the correct answer. } } From 44b18f81a7677a6b6360875ab5924e5b573fb1f9 Mon Sep 17 00:00:00 2001 From: htanweer244 Date: Wed, 2 Oct 2024 14:53:45 +0000 Subject: [PATCH 4/4] adding missing comma --- lesson_03/quiz/src/quizzes/quizzes.module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lesson_03/quiz/src/quizzes/quizzes.module.ts b/lesson_03/quiz/src/quizzes/quizzes.module.ts index deb7785c..f6e38383 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -23,7 +23,7 @@ const QUIZ_PROVIDERS = [ JosephCaballeroQuiz, AngelicaCQuiz, OyeyemiJimohQuiz, - HummadTanweerQuiz + HummadTanweerQuiz, DasiaEnglishQuiz, ChigazoGrahamsQuiz, AmiyahJonesQuiz,