Skip to content

Amiyah Jones, Lesson_03 : Create Quiz questions #98

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

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8cc92d0
Create README.md
AmiyahJo Sep 24, 2024
50b1861
Delete lesson_00/amiyahjones/README.md
AmiyahJo Sep 24, 2024
27d57c0
Merge branch 'code-differently:main' into main
AmiyahJo Sep 25, 2024
fa3c700
Merge branch 'code-differently:main' into main
AmiyahJo Sep 26, 2024
7c2d053
Merge branch 'code-differently:main' into main
AmiyahJo Sep 26, 2024
faedd1b
Merge branch 'code-differently:main' into main
AmiyahJo Sep 26, 2024
19a4187
Merge branch 'code-differently:main' into main
AmiyahJo Sep 26, 2024
7711266
Merge branch 'code-differently:main' into main
AmiyahJo Sep 27, 2024
9a10c4c
Merge branch 'code-differently:main' into main
AmiyahJo Sep 27, 2024
3ea50c4
Merge branch 'code-differently:main' into main
AmiyahJo Sep 27, 2024
d7b772d
Merge branch 'code-differently:main' into main
AmiyahJo Sep 27, 2024
de46b67
Merge branch 'code-differently:main' into main
AmiyahJo Sep 27, 2024
b891561
Merge branch 'code-differently:main' into main
AmiyahJo Sep 28, 2024
7c9f2db
Merge branch 'code-differently:main' into main
AmiyahJo Sep 30, 2024
e5a24bb
.ts file is made
Sep 30, 2024
10f1818
quiz content, replaced provider with my name
Sep 30, 2024
f7c396b
3 question placeholder
Sep 30, 2024
a3b3941
Created my first two questions
Sep 30, 2024
68a052b
fixed makequestion2 format
Sep 30, 2024
f95ade6
all questions properly fixed
Sep 30, 2024
715d2a6
modified test module and yami file
Sep 30, 2024
824a48f
adjustments to quiz.yami
Sep 30, 2024
f3f9379
restart
Sep 30, 2024
921eead
Merge branch 'code-differently:main' into lesson_03
AmiyahJo Sep 30, 2024
0cd8a66
Merge branch 'lesson_03' of https://github.com/AmiyahJo/code-differen…
Sep 30, 2024
9583918
Merge branch 'code-differently:main' into lesson_03
AmiyahJo Sep 30, 2024
6005448
it works!!!! FINALLY
Sep 30, 2024
a6d74f8
chore: adds html README LJ McWilliams (#47)
marleomac3 Sep 30, 2024
bef9ec5
fix: resolves issue with test (#94)
anthonydmays Sep 30, 2024
82e5201
chore: fixes lesson_03 test for real this time (#96)
anthonydmays Sep 30, 2024
a11d6f9
it works!!!! FINALLY
Sep 30, 2024
e1d75b3
Merge branch 'lesson_03' of https://github.com/AmiyahJo/code-differen…
Oct 1, 2024
cc16418
all questions properly fixed
Sep 30, 2024
900bc88
modified test module and yami file
Sep 30, 2024
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
57 changes: 57 additions & 0 deletions lesson_03/quiz/src/quizzes/amiyah_jones_quiz.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import {
AnswerChoice,
MultipleChoiceQuizQuestion,
QuizQuestion,
QuizQuestionProvider,
} from 'codedifferently-instructional';

export class AmiyahJonesQuiz implements QuizQuestionProvider {
getProviderName(): string {
return 'amiyahjones';
}

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

private static makeQuestion0(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
0,
'What two computer parts get mixed up often?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'Power supply and mother board'],
[AnswerChoice.B, 'Graphics card and ram'],
[AnswerChoice.C, 'Ram and hard drive'],
[AnswerChoice.D, 'None of them get mixed up'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}

private static makeQuestion1(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
1,
'Which computer part figures out how everything is supposed to look on your screen?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'Graphics card'],
[AnswerChoice.B, 'CPU'],
[AnswerChoice.C, 'Mother board'],
[AnswerChoice.D, 'Ram'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}

private static makeQuestion2(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
2,
'What is a computer?',
'A machine that automatically transforms input into output.',
); // Provide an answer.
}
}

Empty file added lesson_03/quiz/src/quizzes/npm
Empty file.
2 changes: 1 addition & 1 deletion lesson_03/quiz/src/quizzes/quizzes.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
export const Quizzes = Symbol.for('Quizzes');

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

@Module({
providers: [
Expand Down