Skip to content

Commit a9a4311

Browse files
feat/lesson03: adds Martha's quiz for homework (#120)
* feat: add Martha's quiz for lesson 03 homework * feat: update quiz question to be relevant to course topics --------- Co-authored-by: Anthony D. Mays <[email protected]>
1 parent 97ac2e4 commit a9a4311

File tree

3 files changed

+77
-1
lines changed

3 files changed

+77
-1
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ quiz:
66
anotherone:
77
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
88
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
9+
marthao:
10+
- $2y$10$y6amHaLPanQnyIaLHfQVo.NLAVnsulCLZYc3OcXj2uJZW4zCwFpc2
11+
- $2y$10$6iYhNOcXHY/Ihf9FdYjulu.rXISSkk3sqWLCDCbybNsWVfoU6sa4q
12+
- $2y$10$IA6MNfZp8mQoVm2P.BYA.efvtgL0Y6ad0VdQ8H8LYhTUcMFXR0JFK
913
nicolejackson:
1014
- $2y$10$eRdxpAR2N0ELMjdQ0DGzlOc8Lx5EhhwcddRJ3qPjit9nH9fwORhg.
1115
- $2y$10$eRdxpAR2N0ELMjdQ0DGzlOc8Lx5EhhwcddRJ3qPjit9nH9fwORhg.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class MarthaOQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'marthao';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
MarthaOQuiz.makeQuestion0(),
16+
MarthaOQuiz.makeQuestion1(),
17+
MarthaOQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'Which of these commands brings in changes from a remote repo AND merges them into the current branch?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'git add'],
27+
[AnswerChoice.B, 'git fetch'],
28+
[AnswerChoice.C, 'git pull'],
29+
[AnswerChoice.D, 'git merge'],
30+
]),
31+
AnswerChoice.UNANSWERED,
32+
); // Replace `UNANSWERED` with the correct answer.
33+
}
34+
35+
private static makeQuestion1(): QuizQuestion {
36+
return new MultipleChoiceQuizQuestion(
37+
1,
38+
'Who is considered the first computer programmer?',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, 'Mike Tyson'],
41+
[AnswerChoice.B, 'Ada Lovelace'],
42+
[AnswerChoice.C, 'Steve Jobs'],
43+
[AnswerChoice.D, 'Mickey Mouse'],
44+
]),
45+
AnswerChoice.UNANSWERED,
46+
); // Replace `UNANSWERED` with the correct answer.
47+
}
48+
49+
private static makeQuestion2(): QuizQuestion {
50+
return new MultipleChoiceQuizQuestion(
51+
2,
52+
'Which of the following is NOT something GPUs are typically used for?',
53+
new Map<AnswerChoice, string>([
54+
[
55+
AnswerChoice.A,
56+
'Converting AC from a wall outlet into DC for computer components.',
57+
],
58+
[AnswerChoice.B, 'Rendering high-resolution graphics for video games.'],
59+
[
60+
AnswerChoice.C,
61+
'Handling complex algorithms for machine learning and training AI.',
62+
],
63+
[
64+
AnswerChoice.D,
65+
'Solving complex math problems for cryptocurrency mining.',
66+
],
67+
]),
68+
AnswerChoice.UNANSWERED,
69+
); // Replace `UNANSWERED` with the correct answer.
70+
}
71+
}

lesson_03/quiz/src/quizzes/quizzes.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import { BrooklynHardenQuiz } from './brooklyn_harden_quiz.js';
1010
import { TaliaCrockettQuiz } from './talia_crockett_quiz.js';
1111
import { TrinitieJacksonQuiz } from './trinitie_jackson_quiz.js';
1212
import { TyranRicesQuiz } from './tyran_rices_quiz.js';
13+
import { MarthaOQuiz } from './martha_o_quiz.js';
1314
import { LindaQuinoaQuiz } from './linda_quinoa_quiz.js';
1415
import { DeanWalstonQuiz } from './dean_walston_quiz.js';
15-
1616
export const Quizzes = Symbol.for('Quizzes');
1717

1818
// Add your quiz provider here.
@@ -30,6 +30,7 @@ const QUIZ_PROVIDERS = [
3030
TaliaCrockettQuiz,
3131
DeanWalstonQuiz,
3232
KerryFergusonQuiz,
33+
MarthaOQuiz,
3334
];
3435

3536
@Module({

0 commit comments

Comments
 (0)