|
| 1 | +import { |
| 2 | + AnswerChoice, |
| 3 | + MultipleChoiceQuizQuestion, |
| 4 | + QuizQuestion, |
| 5 | + QuizQuestionProvider, |
| 6 | +} from 'codedifferently-instructional'; |
| 7 | + |
| 8 | +export class NiaPackquiz implements QuizQuestionProvider { |
| 9 | + getProviderName(): string { |
| 10 | + return 'niapack'; |
| 11 | + } |
| 12 | + |
| 13 | + makeQuizQuestions(): QuizQuestion[] { |
| 14 | + return [ |
| 15 | + NiaPackquiz.makeQuestion0(), |
| 16 | + NiaPackquiz.makeQuestion1(), |
| 17 | + NiaPackquiz.makeQuestion2(), |
| 18 | + ]; |
| 19 | + } |
| 20 | + |
| 21 | + private static makeQuestion0(): QuizQuestion { |
| 22 | + return new MultipleChoiceQuizQuestion( |
| 23 | + 0, |
| 24 | + 'What is branching? Why is it important?', |
| 25 | + new Map<AnswerChoice, string>([ |
| 26 | + [ |
| 27 | + AnswerChoice.A, |
| 28 | + 'It is when a tree grows and is important to make the sky look beautiful', |
| 29 | + ], |
| 30 | + [ |
| 31 | + AnswerChoice.B, |
| 32 | + 'It is when you create a seperate copy of a code and is important because it doesnt affect the main version and makes it easier to work with a team', |
| 33 | + ], |
| 34 | + [ |
| 35 | + AnswerChoice.C, |
| 36 | + 'It is when you delete all previous versions of your code and is important so you dont have to start from scratch', |
| 37 | + ], |
| 38 | + [ |
| 39 | + AnswerChoice.D, |
| 40 | + 'It is merging all changes directly into the main code and is important because it speeds up develpoment by avoiding unnecessary review or debugging steps', |
| 41 | + ], |
| 42 | + ]), |
| 43 | + AnswerChoice.UNANSWERED, |
| 44 | + ); // Replace `UNANSWERED` with the correct answer. |
| 45 | + } |
| 46 | + private static makeQuestion1(): QuizQuestion { |
| 47 | + return new MultipleChoiceQuizQuestion( |
| 48 | + 1, |
| 49 | + 'Which programming languages can you use in VS code?', |
| 50 | + new Map<AnswerChoice, string>([ |
| 51 | + [AnswerChoice.A, 'Only Python'], |
| 52 | + [AnswerChoice.B, 'Only JavaScript'], |
| 53 | + [AnswerChoice.C, 'Multiple languages like Python, JavaScript, and C++'], |
| 54 | + [AnswerChoice.D, 'C++'], |
| 55 | + ]), |
| 56 | + AnswerChoice.UNANSWERED, |
| 57 | + ); // Replace `UNANSWERED` with the correct answer. |
| 58 | + } |
| 59 | + private static makeQuestion2(): QuizQuestion { |
| 60 | + return new MultipleChoiceQuizQuestion( |
| 61 | + 2, |
| 62 | + 'What is a pull request request on GitHub?', |
| 63 | + new Map<AnswerChoice, string>([ |
| 64 | + [ |
| 65 | + AnswerChoice.A, |
| 66 | + 'A way to merge changes from one branch into another after review', |
| 67 | + ], |
| 68 | + [AnswerChoice.B, 'A command to delete a branch permanently'], |
| 69 | + [AnswerChoice.C, 'A method for creating a local copy of a repository'], |
| 70 | + [AnswerChoice.D, 'A tool to schedule automatic repository backups'], |
| 71 | + ]), |
| 72 | + AnswerChoice.UNANSWERED, |
| 73 | + ); // Replace `UNANSWERED` with the correct answer. |
| 74 | + } |
| 75 | +} |
0 commit comments