-
Notifications
You must be signed in to change notification settings - Fork 23
feat completed quiz for lesson 3 #141
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3ded8c6
completed quiz
nia-source 95f2cae
fix: fix quiz answers
nia-source e443fbd
Merge branch 'main' into nialesson3
nia-source e74434b
chore: fixes code formatting
anthonydmays 4907e1b
chore: removes answers
anthonydmays 15bd110
Merge branch 'main' into nialesson3
anthonydmays 76f5742
chore: fix bad character
anthonydmays File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,75 @@ | ||
import { | ||
AnswerChoice, | ||
MultipleChoiceQuizQuestion, | ||
QuizQuestion, | ||
QuizQuestionProvider, | ||
} from 'codedifferently-instructional'; | ||
|
||
export class NiaPackquiz implements QuizQuestionProvider { | ||
getProviderName(): string { | ||
return 'niapack'; | ||
} | ||
|
||
makeQuizQuestions(): QuizQuestion[] { | ||
return [ | ||
NiaPackquiz.makeQuestion0(), | ||
NiaPackquiz.makeQuestion1(), | ||
NiaPackquiz.makeQuestion2(), | ||
]; | ||
} | ||
|
||
private static makeQuestion0(): QuizQuestion { | ||
return new MultipleChoiceQuizQuestion( | ||
0, | ||
'What is branching? Why is it important?', | ||
new Map<AnswerChoice, string>([ | ||
[ | ||
AnswerChoice.A, | ||
'It is when a tree grows and is important to make the sky look beautiful', | ||
], | ||
[ | ||
AnswerChoice.B, | ||
'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', | ||
], | ||
[ | ||
AnswerChoice.C, | ||
'It is when you delete all previous versions of your code and is important so you dont have to start from scratch', | ||
], | ||
[ | ||
AnswerChoice.D, | ||
'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', | ||
], | ||
]), | ||
AnswerChoice.UNANSWERED, | ||
); // Replace `UNANSWERED` with the correct answer. | ||
} | ||
private static makeQuestion1(): QuizQuestion { | ||
return new MultipleChoiceQuizQuestion( | ||
1, | ||
'Which programming languages can you use in VS code?', | ||
new Map<AnswerChoice, string>([ | ||
[AnswerChoice.A, 'Only Python'], | ||
[AnswerChoice.B, 'Only JavaScript'], | ||
[AnswerChoice.C, 'Multiple languages like Python, JavaScript, and C++'], | ||
[AnswerChoice.D, 'C++'], | ||
]), | ||
AnswerChoice.UNANSWERED, | ||
); // Replace `UNANSWERED` with the correct answer. | ||
} | ||
private static makeQuestion2(): QuizQuestion { | ||
return new MultipleChoiceQuizQuestion( | ||
2, | ||
'What is a pull request request on GitHub?', | ||
new Map<AnswerChoice, string>([ | ||
[ | ||
AnswerChoice.A, | ||
'A way to merge changes from one branch into another after review', | ||
], | ||
[AnswerChoice.B, 'A command to delete a branch permanently'], | ||
[AnswerChoice.C, 'A method for creating a local copy of a repository'], | ||
[AnswerChoice.D, 'A tool to schedule automatic repository backups'], | ||
]), | ||
AnswerChoice.UNANSWERED, | ||
); // Replace `UNANSWERED` with the correct answer. | ||
} | ||
} |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.