Skip to content

Jbey Lesson 03 Homework DONE #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 11, 2025
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
6 changes: 5 additions & 1 deletion lesson_03/quiz/quiz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ quiz:
- $2y$10$55EXRjF26JIgebtoH800ZOJecfefvMgHicuxf/rwTENuxiUaFQcNe
anotherone:
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
computerparts:
- $2y$10$7TUXmYaJlWnRZTzYR..CsefgVcOZJMGt7ctxyAf.G3obBBFEAB342
- $2y$10$0ghuTDegle177q8VjCgQ2OhManKjotYXrcDT3SLyUF8KvI152Wd0.
- $2y$10$JXoeInFy4UzHhi2Lskxzeu7CQ9RprnJgBw9pjAlV.t6zQyJTyy8OK
79 changes: 79 additions & 0 deletions lesson_03/quiz/src/quizzes/jbeyquiz.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import {
AnswerChoice,
MultipleChoiceQuizQuestion,
} from 'codedifferently-instructional';
export class Jbeyquiz {
getProviderName() {
return 'computerparts';
}
makeQuizQuestions() {
return [
Jbeyquiz.makeQuestion0(),
Jbeyquiz.makeQuestion1(),
Jbeyquiz.makeQuestion2(),
];
}
static makeQuestion0() {
return new MultipleChoiceQuizQuestion(
0,
'What is RAM?',
new Map([
[AnswerChoice.A, 'Robotic Automated Mechanism'],
[
AnswerChoice.B,
'A type of storage device that holds all of your files',
],
[
AnswerChoice.C,
'Special software that controls your computers internet connection',
],
[AnswerChoice.D, 'Random Access Memory'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}
static makeQuestion1() {
return new MultipleChoiceQuizQuestion(
1,
'What is a GPU?',
new Map([
[
AnswerChoice.A,
'A powerful cooling fan that keeps your computer from overheating',
],
[AnswerChoice.B, 'A special type of harddrive'],
[
AnswerChoice.C,
'A special type of processor primarily designed to handleand accelerate the rendering of images, video, and animations.',
],
[
AnswerChoice.D,
'A keyboard that controls the movement of your mouse on screen',
],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}
static makeQuestion2() {
return new MultipleChoiceQuizQuestion(
2,
'What is an SSD?',
new Map([
[AnswerChoice.A, 'A type of RAM that stores data permanently'],
[
AnswerChoice.B,
'A storage device used in computers and other electronic devices',
],
[
AnswerChoice.C,
'A type of USB cable that connects your computer to the internet',
],
[
AnswerChoice.D,
'A type of screen that displays the contents of your computers memory',
],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}
}
3 changes: 2 additions & 1 deletion lesson_03/quiz/src/quizzes/quizzes.module.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Module } from '@nestjs/common';
import { AnotherQuiz } from './another_quiz.js';
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
import { Jbeyquiz } from './jbeyquiz.js';

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

// Add your quiz provider here.
const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz];
const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz, Jbeyquiz];

@Module({
providers: [
Expand Down