Skip to content

Commit fad7370

Browse files
Added and updated lesson_03
1 parent 5226501 commit fad7370

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class KarensQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'karenalabi';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
KarensQuiz.makeQuestion0(),
16+
KarensQuiz.makeQuestion1(),
17+
KarensQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What does GPU stand for?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'Graphical Processing Unit'],
27+
[AnswerChoice.B, 'Gaming Processing Unit'],
28+
[
29+
AnswerChoice.C,'General Preserving Unit',
30+
],
31+
[AnswerChoice.D, 'George P. Underwood'],
32+
]),
33+
AnswerChoice.UNANSWERED,
34+
); // Replace `UNANSWERED` with the correct answer.
35+
}
36+
37+
private static makeQuestion1(): QuizQuestion {
38+
return new MultipleChoiceQuizQuestion(
39+
1,
40+
'Which of the following best describes a computer?',
41+
new Map<AnswerChoice, string>([
42+
[AnswerChoice.A, 'Karen from Spongebob'],
43+
[AnswerChoice.B,
44+
'A machine that automatically transforms input data into output data using pre-programmed instructions',],
45+
[AnswerChoice.C,'A high-tech calculator that only performs basic arithmetic operations like addition and subtraction, making it useful only for solving math problems',],
46+
[AnswerChoice.D, 'A microwave with a keyboard that heats up data instead of food'],
47+
]),
48+
AnswerChoice.UNANSWERED,
49+
); // Provide the correct answer.
50+
}
51+
52+
private static makeQuestion2(): QuizQuestion {
53+
return new MultipleChoiceQuizQuestion(
54+
2,
55+
'What is the motherboard?',
56+
new Map<AnswerChoice, string>([
57+
[AnswerChoice.A, 'A big chip that controls how fast your computer runs.'],
58+
[AnswerChoice.B, 'The part of the computer that generates electricity to power all the other components.'],
59+
[AnswerChoice.C, 'The main circuit board of a computer that houses the CPU, memory, and other essential components.'],
60+
[AnswerChoice.D, 'The board that a mother uses to control the computer.'],
61+
]),
62+
AnswerChoice.A,
63+
);
64+
}
65+
}

0 commit comments

Comments
 (0)