-
Notifications
You must be signed in to change notification settings - Fork 26
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
Primary/lesson05 Quiz / User Reviews #221
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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 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,192 @@ | ||
import { | ||
AnswerChoice, | ||
MultipleChoiceQuizQuestion, | ||
QuizPrinter, | ||
QuizQuestion, | ||
} from "codedifferently-instructional"; | ||
|
||
export class Lesson2 { | ||
run(): void { | ||
const quizQuestions = Lesson2.makeQuizQuestions(); | ||
if (!quizQuestions) throw new Error("Quiz questions cannot be null"); | ||
const printer = new QuizPrinter(); | ||
printer.printQuiz(quizQuestions); | ||
} | ||
|
||
static makeQuizQuestions(): QuizQuestion[] { | ||
return [ | ||
Lesson2.makeQuestion0(), | ||
Lesson2.makeQuestion1(), | ||
Lesson2.makeQuestion2(), | ||
Lesson2.makeQuestion3(), | ||
Lesson2.makeQuestion4(), | ||
Lesson2.makeQuestion5(), | ||
Lesson2.makeQuestion6(), | ||
Lesson2.makeQuestion7(), | ||
Lesson2.makeQuestion8(), | ||
Lesson2.makeQuestion9(), | ||
Lesson2.makeQuestion10(), | ||
]; | ||
} | ||
|
||
private static makeQuestion0(): QuizQuestion { | ||
return new MultipleChoiceQuizQuestion( | ||
0, | ||
"What is the main purpose of version control?", | ||
new Map([ | ||
[AnswerChoice.A, "To make backups of files"], | ||
[AnswerChoice.B, "To keep a record of changes over time"], | ||
[AnswerChoice.C, "To delete unnecessary files"], | ||
[AnswerChoice.D, "To run code more efficiently"], | ||
]), | ||
AnswerChoice.B, // Replace `UNANSWERED` with the correct answer. | ||
); | ||
} | ||
|
||
private static makeQuestion1(): QuizQuestion { | ||
return new MultipleChoiceQuizQuestion( | ||
1, | ||
"What is a fork in Git?", | ||
new Map([ | ||
[ | ||
AnswerChoice.A, | ||
"A duplicate copy of a repository that you own and modify", | ||
], | ||
[AnswerChoice.B, "A temporary backup of the code"], | ||
[AnswerChoice.C, "A tool for merging branches"], | ||
[AnswerChoice.D, "A way to delete a repository"], | ||
]), | ||
AnswerChoice.A, // Replace `UNANSWERED` with the correct answer. | ||
); | ||
} | ||
|
||
private static makeQuestion2(): QuizQuestion { | ||
return new MultipleChoiceQuizQuestion( | ||
2, | ||
"Which of the following is NOT part of the basic Git workflow?", | ||
new Map([ | ||
[AnswerChoice.A, "Pull the latest changes"], | ||
[AnswerChoice.B, "Commit changes locally"], | ||
[AnswerChoice.C, "Push changes to the server"], | ||
[AnswerChoice.D, "Write code directly in GitHub"], | ||
]), | ||
AnswerChoice.D, // Replace `UNANSWERED` with the correct answer. | ||
); | ||
} | ||
|
||
private static makeQuestion3(): QuizQuestion { | ||
return new MultipleChoiceQuizQuestion( | ||
3, | ||
"What command is used to combine changes from different branches?", | ||
new Map([ | ||
[AnswerChoice.A, "git commit"], | ||
[AnswerChoice.B, "git merge"], | ||
[AnswerChoice.C, "git branch"], | ||
[AnswerChoice.D, "git pull"], | ||
]), | ||
AnswerChoice.B, // Replace `UNANSWERED` with the correct answer. | ||
); | ||
} | ||
|
||
private static makeQuestion4(): QuizQuestion { | ||
return new MultipleChoiceQuizQuestion( | ||
4, | ||
"Which IDE is being used in the class?", | ||
new Map([ | ||
[AnswerChoice.A, "Eclipse"], | ||
[AnswerChoice.B, "IntelliJ IDEA"], | ||
[AnswerChoice.C, "NetBeans"], | ||
[AnswerChoice.D, "VS Code"], | ||
]), | ||
AnswerChoice.D, // Replace `UNANSWERED` with the correct answer. | ||
); | ||
} | ||
|
||
private static makeQuestion5(): QuizQuestion { | ||
return new MultipleChoiceQuizQuestion( | ||
5, | ||
"What feature allows developers to work from the same pre-configured environment in VS Code?", | ||
new Map([ | ||
[AnswerChoice.A, "Extensions"], | ||
[AnswerChoice.B, "Debugger"], | ||
[AnswerChoice.C, "Dev Containers"], | ||
[AnswerChoice.D, "Source Control"], | ||
]), | ||
AnswerChoice.C, // Replace `UNANSWERED` with the correct answer. | ||
); | ||
} | ||
|
||
private static makeQuestion6(): QuizQuestion { | ||
return new MultipleChoiceQuizQuestion( | ||
6, | ||
"What is NOT a reason for using an IDE?", | ||
new Map([ | ||
[AnswerChoice.A, "Editing and refactoring code"], | ||
[AnswerChoice.B, "Browsing code"], | ||
[AnswerChoice.C, "Playing music"], | ||
[AnswerChoice.D, "Managing source control"], | ||
]), | ||
AnswerChoice.C, // Replace `UNANSWERED` with the correct answer. | ||
); | ||
} | ||
|
||
private static makeQuestion7(): QuizQuestion { | ||
return new MultipleChoiceQuizQuestion( | ||
7, | ||
"What is the command to list files in the current directory?", | ||
new Map([ | ||
[AnswerChoice.A, "pwd"], | ||
[AnswerChoice.B, "ls"], | ||
[AnswerChoice.C, "cd"], | ||
[AnswerChoice.D, "mkdir"], | ||
]), | ||
AnswerChoice.B, // Replace `UNANSWERED` with the correct answer. | ||
); | ||
} | ||
|
||
private static makeQuestion8(): QuizQuestion { | ||
return new MultipleChoiceQuizQuestion( | ||
8, | ||
"Which command is used to change directories in the terminal?", | ||
new Map([ | ||
[AnswerChoice.A, "pwd"], | ||
[AnswerChoice.B, "ls"], | ||
[AnswerChoice.C, "cd"], | ||
[AnswerChoice.D, "mkdir"], | ||
]), | ||
AnswerChoice.C, // Replace `UNANSWERED` with the correct answer. | ||
); | ||
} | ||
|
||
private static makeQuestion9(): QuizQuestion { | ||
return new MultipleChoiceQuizQuestion( | ||
9, | ||
"What does the command `chmod` do?", | ||
new Map([ | ||
[AnswerChoice.A, "Change file or directory permissions"], | ||
[AnswerChoice.B, "List files in a directory"], | ||
[AnswerChoice.C, "Remove a file or directory"], | ||
[AnswerChoice.D, "Copy a file or directory"], | ||
]), | ||
AnswerChoice.A, // Replace `UNANSWERED` with the correct answer. | ||
); | ||
} | ||
|
||
private static makeQuestion10(): QuizQuestion { | ||
return new MultipleChoiceQuizQuestion( | ||
10, | ||
"What is the shortcut for getting to the Mac terminal?", | ||
new Map([ | ||
[AnswerChoice.A, "⌘ + Shift + T"], | ||
[AnswerChoice.B, '⌘ + Spacebar, then type "terminal"'], | ||
[AnswerChoice.C, "⌘ + Q"], | ||
[AnswerChoice.D, '⌘ + S, then type "terminal"'], | ||
]), | ||
AnswerChoice.B, // Replace `UNANSWERED` with the correct answer. | ||
); | ||
} | ||
} | ||
|
||
if (!process.env.JEST_WORKER_ID) { | ||
new Lesson2().run(); | ||
} |
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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please read the article in the homework assignment that describes the purpose and structure of user stories. These are not it. |
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,24 @@ | ||
1. | ||
|
||
Future - Star Trek era | ||
|
||
I am calling an issue with your teleporter, the new updater. We were transporting two people and when they reimaged on the ship they exchanged from the hips down. How do we exactly fix them? And get an update to fix this issue? | ||
|
||
2. | ||
|
||
Present | ||
|
||
Customer: I am checking on my order it hasn't shipped yet (now 2 weeks after order). | ||
Company: Oh we don't ship them out for 20 business days after receiving the order. | ||
Customer: (drops phone). | ||
Company: Any else I can help you with? | ||
|
||
3. | ||
|
||
Past | ||
|
||
Revolutionany War | ||
|
||
British: They are hiding behind things, they aren't supposed to that. | ||
Americans: We got the new update for the war. | ||
Company: Try updating your technique. |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have a bunch of other files that should not be in this pull request. I should only see lesson_05 files here.