Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lesson_03/quiz/quiz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ quiz:
- $2y$10$FMRsdjEhIG0anbZOIcVvSOy4e4eFTZGIYYyATChwc.QRMpWuomR5C
- $2y$10$0AQW/94c4pPxp8xIhJUIs.qoLnUuQg/Hwe1vd4975K96EKGEPz.H6
- $2y$10$ibNpd6ZjWh/yRXafaN8R5.vxbBw7KVZ7r4IsFv4Uy3naXqagr2B5W
evanderblue:
- $2y$10$jrzJya6WaaYok/vLLHxkSuZR/DxlaKZwFfbLZ0ecoVLL2Xh6yjyDq
- $2y$10$Z1ZuoK050bRTVDb3X/xkcuw1pGQvKGkhoLVqmVABTTOwcJPjsIOG6
- $2y$10$t3aHn3NxL/fP0n8w2yHm4OnLNF2ZYEztm.Avwgo2vleOkfRWKdRSa
lindaquinoa:
- $2y$10$c.9r1fNSkCuBu6TBI53vfet82OkufPL4mkFZsocIFpz3dQQoYkL9K
- $2y$10$5.x9AKn2gEhew5ek1Y7GguN/bvae2EktevTDpCBvuEjqqOy/MeuHK
Expand Down
65 changes: 65 additions & 0 deletions lesson_03/quiz/src/quizzes/evander_blue_quiz.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import {
AnswerChoice,
MultipleChoiceQuizQuestion,
QuizQuestion,
QuizQuestionProvider,
} from 'codedifferently-instructional';

export class EvanderBlueQuiz implements QuizQuestionProvider {
getProviderName(): string {
return 'evanderblue';
}

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

private static makeQuestion0(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
0,
'What is does the command git push do?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'Uploads your local commits to a remote repository'],
[
AnswerChoice.B,
'Downloads commits from a remote repository to your local machine',
],
[AnswerChoice.C, 'Creates a new branch in your local repository'],
[
AnswerChoice.D,
'Saves your changes to the staging area without committing',
],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}

private static makeQuestion1(): QuizQuestion {
return new QuizQuestion(
1,
'What does RAM stand for?',
'Random Access Memory',
); // Provide an answer.
}

private static makeQuestion2(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
2,
'What does a CPU do?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'Stores long-term data like documents and photos'],
[AnswerChoice.B, 'Controls the display output to the monitor'],
[
AnswerChoice.C,
'Executes instructions and performs calculations for the computer',
],
[AnswerChoice.D, "Provides power to the computer's components"],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}
}
2 changes: 2 additions & 0 deletions lesson_03/quiz/src/quizzes/quizzes.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { TyranRicesQuiz } from './tyran_rices_quiz.js';
import { MarthaOQuiz } from './martha_o_quiz.js';
import { LindaQuinoaQuiz } from './linda_quinoa_quiz.js';
import { DeanWalstonQuiz } from './dean_walston_quiz.js';
import { EvanderBlueQuiz } from './evander_blue_quiz.js';
export const Quizzes = Symbol.for('Quizzes');

// Add your quiz provider here.
Expand All @@ -31,6 +32,7 @@ const QUIZ_PROVIDERS = [
DeanWalstonQuiz,
KerryFergusonQuiz,
MarthaOQuiz,
EvanderBlueQuiz
];

@Module({
Expand Down