diff --git a/lesson_03/quiz/quiz.yaml b/lesson_03/quiz/quiz.yaml index b5827ea59..e498ca944 100644 --- a/lesson_03/quiz/quiz.yaml +++ b/lesson_03/quiz/quiz.yaml @@ -6,6 +6,10 @@ quiz: anotherone: - $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK - $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa + chigazograham: + - $2y$10$OTnSih9kHykUnsuM/YKufu3MXTpOZrif.dL13XwXt8rquJL4mV.m. + - $2y$10$je60MntrKRBd/1tz7hNUY.D/cyKOEM.hp6/1fVVVGJRIIitmUGI5e + - $2y$10$pPTmEp0acs8.NIAamLpmmuF7B72bXFZsikHywQI/JvfXuySkhHH5S oyeyemijimoh: - $2y$10$2LlSxAEM1HmR3Wl2fO6LQueu/77spr5SuWAh4b3MKesIWNy3CFjGe - $2y$10$csA90DFxK7.uq6dSfS06Yukk5fQPrzLvU2Lp43ArTs2za28LVvRGO diff --git a/lesson_03/quiz/src/quizzes/chigazo_graham_quiz.ts b/lesson_03/quiz/src/quizzes/chigazo_graham_quiz.ts new file mode 100644 index 000000000..711c1c9f5 --- /dev/null +++ b/lesson_03/quiz/src/quizzes/chigazo_graham_quiz.ts @@ -0,0 +1,62 @@ +import { + AnswerChoice, + MultipleChoiceQuizQuestion, + QuizQuestion, + QuizQuestionProvider, +} from 'codedifferently-instructional'; + +export class ChigazoGrahamsQuiz implements QuizQuestionProvider { + getProviderName(): string { + return 'chigazograham'; + } + + makeQuizQuestions(): QuizQuestion[] { + return [ + ChigazoGrahamsQuiz.makeQuestion0(), + ChigazoGrahamsQuiz.makeQuestion1(), + ChigazoGrahamsQuiz.makeQuestion2(), + ]; + } + + private static makeQuestion0(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 0, + 'What is the sign for modulo?', + new Map([ + [AnswerChoice.A, '^'], + [AnswerChoice.B, '*'], + [AnswerChoice.C, '%'], + [AnswerChoice.D, '//'], + ]), + AnswerChoice.UNANSWERED, + ); // Provide an answer. | AnswerChoice.C, '%' + } + + private static makeQuestion1(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 1, + 'Who are hip hops big three', + new Map([ + [AnswerChoice.A, 'Kendrick Lamar, J. Cole, and Drake'], + [AnswerChoice.B, 'Tupac, Biggie, and Nas'], + [AnswerChoice.C, 'Kanye West, Eminem, and Lil Wayne'], + [AnswerChoice.D, 'K. Dot'], + ]), + AnswerChoice.UNANSWERED, + ); // Provide an answer. | AnswerChoice.C, '%' + } + + private static makeQuestion2(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 2, + 'what is the answer to life, the universe, and everything else?', + new Map([ + [AnswerChoice.A, '42'], + [AnswerChoice.B, 'Jesus'], + [AnswerChoice.C, 'N/A'], + [AnswerChoice.D, 'Whatever you want it to be!'], + ]), + AnswerChoice.UNANSWERED, + ); // Provide an answer. | AnswerChoice.A, '42' + } +} \ No newline at end of file diff --git a/lesson_03/quiz/src/quizzes/quizzes.module.ts b/lesson_03/quiz/src/quizzes/quizzes.module.ts index 0d6a58322..dcfe6a95e 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -2,6 +2,7 @@ import { Module } from '@nestjs/common'; import { AnotherQuiz } from './another_quiz.js'; import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js'; import { AnthonyMaysQuiz } from './anthony_mays_quiz.js'; +import { ChigazoGrahamsQuiz } from './chigazo_graham_quiz.js'; import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js'; import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js'; @@ -15,7 +16,7 @@ const QUIZ_PROVIDERS = [ AnotherQuiz, JosephCaballeroQuiz, OyeyemiJimohQuiz, -]; + ChigazoGrahamsQuiz]; @Module({ providers: [