Skip to content

add oliviajames quiz #122

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 2 commits into from
Closed
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
62 changes: 62 additions & 0 deletions lesson_03/quiz/src/quizzes/olivia_james_quiz.ts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have not yet completed all the assignment requirements (still a couple of additional files you need to modify). Keep at it!

Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import {
AnswerChoice,
MultipleChoiceQuizQuestion,
QuizQuestion,
QuizQuestionProvider,
} from 'codedifferently-instructional';

export class OliviaJamesQuiz implements QuizQuestionProvider {
getProviderName(): string {
return 'oliviajames';
}

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

private static makeQuestion0(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
0,
'Which CSS property is used to change the font size of an element?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'text-size'],
[AnswerChoice.B, 'font-size'],
[AnswerChoice.C, 'size'],
[AnswerChoice.D, 'font-weight'],
]),
AnswerChoice.UNANSWERED,
);
}

private static makeQuestion1(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
1,
'Which of the following is the correct syntax for a CSS comment??',
new Map<AnswerChoice, string>([
[AnswerChoice.A, '// This is a comment'],
[AnswerChoice.B, ' /* This is a comment */'],
[AnswerChoice.C, '# This is a comment'],
[AnswerChoice.D, '<!-- This is a comment -->'],
]),
AnswerChoice.UNANSWERED,
);
}

private static makeQuestion2(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
2,
'Which of the following is the correct syntax for a CSS comment??',
new Map<AnswerChoice, string>([
[AnswerChoice.A, '<ol>'],
[AnswerChoice.B, '<ul>'],
[AnswerChoice.C, '<li>'],
[AnswerChoice.D, '<list>'],
]),
AnswerChoice.UNANSWERED,
);
}
}