forked from code-differently/code-differently-24-q4
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds Dasia's quiz questions (code-differently#114)
* feat: Dasia quizz questions * fix: duplicate declaration * Fix: capitalization * Forgot to delete a line * duplicate name
- Loading branch information
1 parent
7dc5f77
commit d587d16
Showing
3 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import { | ||
AnswerChoice, | ||
MultipleChoiceQuizQuestion, | ||
QuizQuestion, | ||
QuizQuestionProvider, | ||
} from 'codedifferently-instructional'; | ||
|
||
export class DasiaEnglishQuiz implements QuizQuestionProvider { | ||
getProviderName(): string { | ||
return 'dasiaenglish'; | ||
} | ||
|
||
makeQuizQuestions(): QuizQuestion[] { | ||
return [ | ||
DasiaEnglishQuiz.makeQuestion0(), | ||
DasiaEnglishQuiz.makeQuestion1(), | ||
DasiaEnglishQuiz.makeQuestion2(), | ||
]; | ||
} | ||
|
||
private static makeQuestion0(): QuizQuestion { | ||
return new MultipleChoiceQuizQuestion( | ||
0, | ||
'How often should you sync your fork?', | ||
new Map<AnswerChoice, string>([ | ||
[AnswerChoice.A, 'Never'], | ||
[AnswerChoice.B, 'Once a day'], | ||
[AnswerChoice.C, 'About every hour or as often as possible'], | ||
[AnswerChoice.D, 'Once a week'], | ||
]), | ||
AnswerChoice.UNANSWERED, | ||
); // Replace `UNANSWERED` with the correct answer. | ||
} | ||
|
||
private static makeQuestion1(): QuizQuestion { | ||
return new MultipleChoiceQuizQuestion( | ||
1, | ||
'What is a computer?', | ||
new Map<AnswerChoice, string>([ | ||
[ | ||
AnswerChoice.A, | ||
'A machine that transforms input to output data using automatically executed pre-programmed instructions', | ||
], | ||
[AnswerChoice.B, 'A machine'], | ||
[AnswerChoice.C, 'A laptop'], | ||
[ | ||
AnswerChoice.D, | ||
'A machine that automatically executed pre-programmed instructions', | ||
], | ||
]), | ||
AnswerChoice.UNANSWERED, | ||
); // Replace `UNANSWERED` with the correct answer. | ||
} | ||
private static makeQuestion2(): QuizQuestion { | ||
return new MultipleChoiceQuizQuestion( | ||
2, | ||
'What part of the computer does everything have to run through?', | ||
new Map<AnswerChoice, string>([ | ||
[AnswerChoice.A, 'CPU'], | ||
[AnswerChoice.B, 'GPU'], | ||
[AnswerChoice.C, 'RAM'], | ||
[AnswerChoice.D, 'Motherboard'], | ||
]), | ||
AnswerChoice.UNANSWERED, | ||
); // Replace `UNANSWERED` with the correct answer. | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters