Skip to content

Commit

Permalink
Merge branch 'code-differently:main' into nilejack-lesson_03
Browse files Browse the repository at this point in the history
  • Loading branch information
nilejack authored Oct 1, 2024
2 parents aef8b39 + de452f0 commit 34f8e14
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 1 deletion.
9 changes: 9 additions & 0 deletions lesson_03/quiz/quiz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ quiz:
anotherone:
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
dasiaenglish:
- $2y$10$ANtdDzA0GAqn/QeExPO/Du8LgHUwznRLxpv0W0ib2seYk23BZowOC
- $2y$10$6vAkOUmpPrUtWrh010f8e.A4M9kEzuzCrQ8ghWI9hQSEsZeGHpQ9W
- $2y$10$YYTJf2QW.BJST9EUB7NZneVpNkOywIfhsWRpxIsPBg/oTmgqoYWse
chigazograham:
- $2y$10$OTnSih9kHykUnsuM/YKufu3MXTpOZrif.dL13XwXt8rquJL4mV.m.
- $2y$10$je60MntrKRBd/1tz7hNUY.D/cyKOEM.hp6/1fVVVGJRIIitmUGI5e
Expand All @@ -22,7 +26,12 @@ quiz:
- $2y$10$XcsVuO66KZiUiN75NtssdOkKvHKhuBo91JgE/TJEnSrrzbhjxuql.
- $2y$10$9fZs867NHxoPQ/VWMeLyj.us5Kg3SLPcbt9O5ki/FdJ37TbhgFMFC
- $2y$10$GfjcKvtzr6n8553Mdr1RJOOYDfzOudlW.3i8otsH0HiW52CU7tUAW
angelicacastillo:
- $2y$10$MkiKfTFDIR5e4nWe3Q3XKOSEk2E06urRRykXIx/2JV6Y5j.OPIWMi
- $2y$10$WsWcxQ.rCkq/WoUVMbdMNuUU8v5O9xDFpWdbWydVFu7/Ufz/8lLru
- $2y$10$9FB5PKcxb5z0xijnLVnF8.127CghZcgd7.0Phn2QsWdCYBxxZWrwG
amiyahjones:
- $2y$10$QsN9VkjWORsKgZRiBT46VOUgc5HVnswKAT4uDbs7JYbTF7DdKbsw.
- $2y$10$sqXEOL0L8o0kRyiAb.2s4u0RlBC2.LmOGDbGWXHj5IfBNwinkv2yq
- $2y$10$HaWueXgrIzd7z8yf39HfVeTjjyr.Kgx0GFBqwCRSzW3zRSreN19yi

60 changes: 60 additions & 0 deletions lesson_03/quiz/src/quizzes/angelica_c_quiz.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import {
AnswerChoice,
MultipleChoiceQuizQuestion,
QuizQuestion,
QuizQuestionProvider,
} from 'codedifferently-instructional';

export class AngelicaCQuiz implements QuizQuestionProvider {
getProviderName(): string {
return 'angelicacastillo';
}

makeQuizQuestions(): QuizQuestion[] {
return [
AngelicaCQuiz.makeQuestion0(),
AngelicaCQuiz.makeQuestion1(),
AngelicaCQuiz.makeQuestion2(),
];
}

private static makeQuestion0(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
0,
'What does CPU stand for?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'Central Processing Unit'],
[AnswerChoice.B, 'Central Program Unit'],
[AnswerChoice.C,'Center Program Unit'],
[AnswerChoice.D, 'Whatever you want it to be!'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}
private static makeQuestion1(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
1,
'Which of the following would be a "simple" essential part of the computer?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'RAM'],
[AnswerChoice.B, 'CPU'],
[AnswerChoice.C,'CASE'],
[AnswerChoice.D, 'HARD DRIVE'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}
private static makeQuestion2(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
2,
'What would be considered the brains long term memory?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'Mother board'],
[AnswerChoice.B, 'Hard drive'],
[AnswerChoice.C,'Power supply'],
[AnswerChoice.D, 'Computer'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}
}
67 changes: 67 additions & 0 deletions lesson_03/quiz/src/quizzes/dasia_english_quiz.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import {
AnswerChoice,
MultipleChoiceQuizQuestion,
QuizQuestion,
QuizQuestionProvider,
} from 'codedifferently-instructional';

export class DasiaEnglishQuiz implements QuizQuestionProvider {
getProviderName(): string {
return 'dasiaenglish';
}

makeQuizQuestions(): QuizQuestion[] {
return [
DasiaEnglishQuiz.makeQuestion0(),
DasiaEnglishQuiz.makeQuestion1(),
DasiaEnglishQuiz.makeQuestion2(),
];
}

private static makeQuestion0(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
0,
'How often should you sync your fork?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'Never'],
[AnswerChoice.B, 'Once a day'],
[AnswerChoice.C, 'About every hour or as often as possible'],
[AnswerChoice.D, 'Once a week'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}

private static makeQuestion1(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
1,
'What is a computer?',
new Map<AnswerChoice, string>([
[
AnswerChoice.A,
'A machine that transforms input to output data using automatically executed pre-programmed instructions',
],
[AnswerChoice.B, 'A machine'],
[AnswerChoice.C, 'A laptop'],
[
AnswerChoice.D,
'A machine that automatically executed pre-programmed instructions',
],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}
private static makeQuestion2(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
2,
'What part of the computer does everything have to run through?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'CPU'],
[AnswerChoice.B, 'GPU'],
[AnswerChoice.C, 'RAM'],
[AnswerChoice.D, 'Motherboard'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}
}
6 changes: 5 additions & 1 deletion lesson_03/quiz/src/quizzes/quizzes.module.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { Module } from '@nestjs/common';
import { AngelicaCQuiz } from './angelica_c_quiz.js';
import { AnotherQuiz } from './another_quiz.js';
import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js';
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
import { DasiaEnglishQuiz } from './dasia_english_quiz.js';
import { ChigazoGrahamsQuiz } from './chigazo_graham_quiz.js';
import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js';
import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js';
import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js';
import { AmiyahJonesQuiz } from './amiyah_jones_quiz.js';

Expand All @@ -16,7 +18,9 @@ const QUIZ_PROVIDERS = [
YafiahAbdullahQuiz,
AnotherQuiz,
JosephCaballeroQuiz,
AngelicaCQuiz,
OyeyemiJimohQuiz,
DasiaEnglishQuiz,
ChigazoGrahamsQuiz,
AmiyahJonesQuiz
];
Expand Down

0 comments on commit 34f8e14

Please sign in to comment.