diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/add-looping-logic-to-your-code-using-the-do-while-and-while-statements-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/add-looping-logic-to-your-code-using-the-do-while-and-while-statements-in-c-sharp.md index 31661af0336..0a037a2b30c 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/add-looping-logic-to-your-code-using-the-do-while-and-while-statements-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/add-looping-logic-to-your-code-using-the-do-while-and-while-statements-in-c-sharp.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +A developer needs to iterate through an array of items to find one that matches a certain criteria. Which is the best iteration statement for this purpose? ## --answers-- -A +`foreach` --- -B +`for` --- -C - ---- - -D - ---- - -E +`while` ## --video-solution-- -4 +1 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/branch-the-flow-of-code-using-the-switch-case-construct-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/branch-the-flow-of-code-using-the-switch-case-construct-in-c-sharp.md index a217ed6168b..5cbf949bc3f 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/branch-the-flow-of-code-using-the-switch-case-construct-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/branch-the-flow-of-code-using-the-switch-case-construct-in-c-sharp.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +What is the purpose of the `break` keyword? ## --answers-- -A +The `break` keyword tells the runtime to continue evaluating other cases in the `switch` construct. --- -B +The `break` keyword tells the runtime to stop evaluating other cases in the `switch` construct. --- -C - ---- - -D - ---- - -E +The `break` keyword tells the runtime to exit the application. ## --video-solution-- -4 +2 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/challenge-project-develop-branching-and-looping-structures-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/challenge-project-develop-branching-and-looping-structures-in-c-sharp.md index 61bd97e5666..9ba1ac5868f 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/challenge-project-develop-branching-and-looping-structures-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/challenge-project-develop-branching-and-looping-structures-in-c-sharp.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +A developer needs to create an iteration statement. Under what condition is a `while` statement a better choice than a `do` statement? ## --answers-- -A +When the expression values evaluated by the iteration statement are unknown prior to the iteration code block. --- -B +When the expression values evaluated by the iteration statement are known prior to the iteration code block. --- -C - ---- - -D - ---- - -E +When the developer creates nested `do` or `while` loops. ## --video-solution-- -4 +2 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/control-variable-scope-and-logic-using-code-blocks-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/control-variable-scope-and-logic-using-code-blocks-in-c-sharp.md index 97f6c48e1d1..002235d8ea5 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/control-variable-scope-and-logic-using-code-blocks-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/control-variable-scope-and-logic-using-code-blocks-in-c-sharp.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +Which of the following describes the affect of a `using` statement? ## --answers-- -A +Affects only the first code block in the code file. --- -B +Affects only the current code block in the code file. --- -C - ---- - -D - ---- - -E +Affects all of the code in the code file. ## --video-solution-- -4 +3 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/evaluate-boolean-expressions-to-make-decisions-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/evaluate-boolean-expressions-to-make-decisions-in-c-sharp.md index 506dc8f3a86..3855a625da3 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/evaluate-boolean-expressions-to-make-decisions-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/evaluate-boolean-expressions-to-make-decisions-in-c-sharp.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +Which of the following lines of code is a valid use of the conditional operator? ## --answers-- -A +`int value = amount >= 10? 10: 20;` --- -B +`int value = amount >= 10: 10? 20;` --- -C - ---- - -D - ---- - -E +`int value = amount >= 10? 10| 20;` ## --video-solution-- -4 +1 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/guided-project-develop-conditional-branching-and-looping-structures-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/guided-project-develop-conditional-branching-and-looping-structures-in-c-sharp.md index b1f838351de..efed1582266 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/guided-project-develop-conditional-branching-and-looping-structures-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/guided-project-develop-conditional-branching-and-looping-structures-in-c-sharp.md @@ -16,28 +16,21 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +When is it appropriate to use a `switch-case` construct rather than a `if-elseif-else` construct? ## --answers-- -A +A `switch-case` construct is appropriate when more than 2-3 `else if` code blocks are required. --- -B +A `switch-case` construct is appropriate when the number of `case` patterns is small. --- -C +A `switch-case` construct is appropriate when the selection statement is inside a loop. ---- - -D - ---- - -E ## --video-solution-- -4 +1 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/iterate-through-a-code-block-using-the-for-statement-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/iterate-through-a-code-block-using-the-for-statement-in-c-sharp.md index e627c07f208..bc5bac8b1ea 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/iterate-through-a-code-block-using-the-for-statement-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/add-logic-to-c-sharp-console-applications/iterate-through-a-code-block-using-the-for-statement-in-c-sharp.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +Which of the following `for` statements is correct? ## --answers-- -A +`for (int x = 20: x < 80: x++)` --- -B +`for (int j = 0; j == 80; j + 1)` --- -C - ---- - -D - ---- - -E +`for (int counter = 20; counter < 80; counter++)` ## --video-solution-- -4 +3 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/add-decision-logic-to-your-code-using-if-else-and-else-if-statements-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/add-decision-logic-to-your-code-using-if-else-and-else-if-statements-in-c-sharp.md index e109848cbc4..1cea1962a0b 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/add-decision-logic-to-your-code-using-if-else-and-else-if-statements-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/add-decision-logic-to-your-code-using-if-else-and-else-if-statements-in-c-sharp.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +Which of the choices below is not a valid operator in C#? ## --answers-- -A +`%%` --- -B +`&&` --- -C - ---- - -D - ---- - -E +`||` ## --video-solution-- -4 +1 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/call-methods-from-the-dot-net-class-library-using-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/call-methods-from-the-dot-net-class-library-using-c-sharp.md index f36f9caf27a..e81a0e2485d 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/call-methods-from-the-dot-net-class-library-using-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/call-methods-from-the-dot-net-class-library-using-c-sharp.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +What is an object? ## --answers-- -A +A memory address. --- -B +A stateless class. --- -C - ---- - -D - ---- - -E +An instance of a class. ## --video-solution-- -4 +3 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/challenge-project-develop-foreach-and-if-elseif-else-structures-to-process-array-data-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/challenge-project-develop-foreach-and-if-elseif-else-structures-to-process-array-data-in-c-sharp.md index d270c50d39d..050d162c48d 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/challenge-project-develop-foreach-and-if-elseif-else-structures-to-process-array-data-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/challenge-project-develop-foreach-and-if-elseif-else-structures-to-process-array-data-in-c-sharp.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +A developer is working with two other developers to update a collection of applications. The developers will use code comments during the update process. Which of the following describes an appropriate use of code comments? ## --answers-- -A +When updates are made, the developers use line and block comments to identify each individual code update. --- -B +When updates are made, the developers leave all existing code comments intact. New comments are added to indicate when old comments no longer apply. --- -C - ---- - -D - ---- - -E +When updates are made, the developers summarize changes using block comments. ## --video-solution-- -4 +3 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/create-readable-code-with-conventions-whitespace-and-comments-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/create-readable-code-with-conventions-whitespace-and-comments-in-c-sharp.md index e79cf7fd30f..5d4a3a4a9da 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/create-readable-code-with-conventions-whitespace-and-comments-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/create-readable-code-with-conventions-whitespace-and-comments-in-c-sharp.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +Which of the following is a bad reason to use a code comment? ## --answers-- -A +To describe the high-level intent of the code. --- -B +To temporarily comment out a line of code while evaluating a feature in a different way. --- -C - ---- - -D - ---- - -E +To explain how a new C# keyword works. ## --video-solution-- -4 +3 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/guided-project-develop-foreach-and-if-elseif-else-structures-to-process-array-data-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/guided-project-develop-foreach-and-if-elseif-else-structures-to-process-array-data-in-c-sharp.md index 0d365fd6574..d724856aa04 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/guided-project-develop-foreach-and-if-elseif-else-structures-to-process-array-data-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/guided-project-develop-foreach-and-if-elseif-else-structures-to-process-array-data-in-c-sharp.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +A developer writes an application that uses a `foreach` loop to iterate through an array containing 20 elements. After the application is complete, the developer learns that the array must be updated to include 40 elements. The application needs to examine all 40 array elements. Which of the following items describes the required code update? ## --answers-- -A +Create a second `foreach` loop that iterates through the additional items. --- -B +No changes are required to the `foreach` loop. --- -C - ---- - -D - ---- - -E +Place the original `foreach` loop inside the code block of a second `foreach` loop that iterates twice. ## --video-solution-- -4 +2 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/install-and-configure-visual-studio-code.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/install-and-configure-visual-studio-code.md index 15109e52e38..8de7fffca20 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/install-and-configure-visual-studio-code.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/install-and-configure-visual-studio-code.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +Which of the following choices provides the best description of an Integrated Development Environment (IDE)? ## --answers-- -A +Visual Studio Code is an Integrated Development Environment. --- -B +An Integrated Development Environment is tool that makes it easier to write code. --- -C - ---- - -D - ---- - -E +An IDE is a suite of tools that supports the full software development lifecycle. ## --video-solution-- -4 +3 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/store-and-iterate-through-sequences-of-data-using-arrays-and-the-foreach-statement-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/store-and-iterate-through-sequences-of-data-using-arrays-and-the-foreach-statement-in-c-sharp.md index a92a4cd5360..f9a07c244fc 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/store-and-iterate-through-sequences-of-data-using-arrays-and-the-foreach-statement-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-and-run-simple-c-sharp-console-applications/store-and-iterate-through-sequences-of-data-using-arrays-and-the-foreach-statement-in-c-sharp.md @@ -16,28 +16,21 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +Which of the following foreach statements is syntactically correct? ## --answers-- -A +`foreach (int value of values)` --- -B +`foreach (int value with values)` --- -C +`foreach (int value in values)` ---- - -D - ---- - -E ## --video-solution-- -4 +3 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-methods-in-c-sharp-console-applications/challenge-project-create-a-mini-game.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-methods-in-c-sharp-console-applications/challenge-project-create-a-mini-game.md index bad15aec6c9..615be34010e 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-methods-in-c-sharp-console-applications/challenge-project-create-a-mini-game.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-methods-in-c-sharp-console-applications/challenge-project-create-a-mini-game.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +A developer wants to create a method that returns a value in an array. Which of the following options would be a good choice for a method signature? ## --answers-- -A +`string GetValueAtIndex(string[] array, int index)` --- -B +`bool GetValueAtIndex(string[] array, int index)` --- -C - ---- - -D - ---- - -E +`int GetValueAtIndex(int index)` ## --video-solution-- -4 +1 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-methods-in-c-sharp-console-applications/create-c-sharp-methods-that-return-values.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-methods-in-c-sharp-console-applications/create-c-sharp-methods-that-return-values.md index d48f6898ac5..b60d4db4dbb 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-methods-in-c-sharp-console-applications/create-c-sharp-methods-that-return-values.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-methods-in-c-sharp-console-applications/create-c-sharp-methods-that-return-values.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +Which of the following options correctly returns a `string` value? ## --answers-- -A +`return "";` --- -B +`return 'a';` --- -C - ---- - -D - ---- - -E +`return 5;` ## --video-solution-- -4 +1 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-methods-in-c-sharp-console-applications/create-c-sharp-methods-with-parameters.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-methods-in-c-sharp-console-applications/create-c-sharp-methods-with-parameters.md index af0799d6f79..e1f51f144e1 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-methods-in-c-sharp-console-applications/create-c-sharp-methods-with-parameters.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-methods-in-c-sharp-console-applications/create-c-sharp-methods-with-parameters.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +Given the method signature, `void Print(string name, string number = "", bool member = false)`, which of the following options correctly uses named and optional arguments? ## --answers-- -A +`Print("Tony", member: true);` --- -B +`Print(number: "555", member: false)` --- -C - ---- - -D - ---- - -E +`Print("Tony", false)` ## --video-solution-- -4 +1 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-methods-in-c-sharp-console-applications/guided-project-plan-a-petting-zoo-visit.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-methods-in-c-sharp-console-applications/guided-project-plan-a-petting-zoo-visit.md index 72f335df163..29c9b5de27f 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-methods-in-c-sharp-console-applications/guided-project-plan-a-petting-zoo-visit.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-methods-in-c-sharp-console-applications/guided-project-plan-a-petting-zoo-visit.md @@ -16,29 +16,21 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +What is the purpose of defining an optional parameter in a method? ## --answers-- -A +To cause a method to perform a different task. --- -B +To overload a method. --- -C - ---- - -D - ---- - -E +To simplify the required parameters when a parameter isn't significant to the result. ## --video-solution-- -4 +3 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-methods-in-c-sharp-console-applications/write-your-first-c-sharp-method.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-methods-in-c-sharp-console-applications/write-your-first-c-sharp-method.md index b7abd41901a..d74a70a9361 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-methods-in-c-sharp-console-applications/write-your-first-c-sharp-method.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/create-methods-in-c-sharp-console-applications/write-your-first-c-sharp-method.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +Which of the following correctly declares a method? ## --answers-- -A +`DisplayNumbers();` --- -B +`void DisplayNumbers{};` --- -C - ---- - -D - ---- - -E +`void DisplayNumbers() { }` ## --video-solution-- -4 +3 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/challenge-project-debug-a-c-sharp-console-application-using-visual-studio-code.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/challenge-project-debug-a-c-sharp-console-application-using-visual-studio-code.md index 5ec9e857d9f..5d5bad54883 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/challenge-project-debug-a-c-sharp-console-application-using-visual-studio-code.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/challenge-project-debug-a-c-sharp-console-application-using-visual-studio-code.md @@ -16,28 +16,21 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +Which of the following options can be used set a breakpoint in Visual Studio Code? ## --answers-- -A +Left-click in the column to the left of a line number in the code editor. +Correct. A breakpoint can be set by positioning the mouse pointer in the column to the left of a line number and then left-clicking. --- -B +Select Toggle Breakpoint on the Edit menu. --- -C - ---- - -D - ---- - -E +Right-click in the middle of a line of code, and then select Toggle Breakpoint. ## --video-solution-- -4 +1 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/create-and-throw-exceptions-in-c-sharp-console-applications.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/create-and-throw-exceptions-in-c-sharp-console-applications.md index 4daac626346..9f292426c73 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/create-and-throw-exceptions-in-c-sharp-console-applications.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/create-and-throw-exceptions-in-c-sharp-console-applications.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +When should a method throw an exception? ## --answers-- -A +A method should throw an exception when the method can complete its intended purpose. --- -B +A method should throw an exception when the method can't complete its intended purpose. --- -C - ---- - -D - ---- - -E +A method should throw an exception when an exception type matches the intended purpose of the method. ## --video-solution-- -4 +2 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/guided-project-debug-and-handle-exceptions-in-a-c-sharp-console-application-using-visual-studio-code.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/guided-project-debug-and-handle-exceptions-in-a-c-sharp-console-application-using-visual-studio-code.md index 5ef7c6f6d53..b3419db1cb2 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/guided-project-debug-and-handle-exceptions-in-a-c-sharp-console-application-using-visual-studio-code.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/guided-project-debug-and-handle-exceptions-in-a-c-sharp-console-application-using-visual-studio-code.md @@ -16,28 +16,16 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +When is an `ArgumentOutOfRangeException` exception thrown? ## --answers-- -A +An `ArgumentOutOfRangeException` exception is thrown when an attempt is made to index an array outside the bounds of the array. ---- +An `ArgumentOutOfRangeException` exception is thrown when the value of an argument is outside the allowable range of values as defined by the method. -B - ---- - -C - ---- - -D - ---- - -E +An `ArgumentOutOfRangeException` exception is thrown when an attempt is made to store a value of one type in an array of another type. ## --video-solution-- -4 +2 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/implement-exception-handling-in-c-sharp-console-applications.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/implement-exception-handling-in-c-sharp-console-applications.md index c0aff20cdac..fe3671c2b69 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/implement-exception-handling-in-c-sharp-console-applications.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/implement-exception-handling-in-c-sharp-console-applications.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +When is an `ArrayTypeMismatchException` exception thrown? ## --answers-- -A +An `ArrayTypeMismatchException` exception is thrown when an attempt is made to store a value of one type in an array of another type. --- -B +An `ArrayTypeMismatchException` exception is thrown when attempting to access a member on a type whose value is null. --- -C - ---- - -D - ---- - -E +An `ArrayTypeMismatchException` exception is thrown when an attempt is made to index an array outside the bounds of the array. ## --video-solution-- -4 +1 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/implement-the-visual-studio-code-debugging-tools-for-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/implement-the-visual-studio-code-debugging-tools-for-c-sharp.md index c3db41ad9e3..77000b9538c 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/implement-the-visual-studio-code-debugging-tools-for-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/implement-the-visual-studio-code-debugging-tools-for-c-sharp.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +Which section of the RUN AND DEBUG view is used to track the current point of execution within the running application? ## --answers-- -A +The VARIABLES section. --- -B +The CALL STACK section. --- -C - ---- - -D - ---- - -E +The WATCH section. ## --video-solution-- -4 +2 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/review-the-principles-of-code-debugging-and-exception-handling.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/review-the-principles-of-code-debugging-and-exception-handling.md index cabc3e7c7c7..f5cb371e48b 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/review-the-principles-of-code-debugging-and-exception-handling.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/debug-c-sharp-console-applications/review-the-principles-of-code-debugging-and-exception-handling.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +What is the relationship between the type of exception and the information it contains? ## --answers-- -A +The type of exception determines the information it contains. --- -B +The type of exception and the information it contains are unrelated. --- -C - ---- - -D - ---- - -E +The information contained in an exception determines the type of exception. ## --video-solution-- -4 +1 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/challenge-project-work-with-variable-data-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/challenge-project-work-with-variable-data-in-c-sharp.md index f3663d506b0..da7b9e9e57c 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/challenge-project-work-with-variable-data-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/challenge-project-work-with-variable-data-in-c-sharp.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +To sort a string array, why is it be important to use the `String.Trim()` method on each array element before sorting? ## --answers-- -A +Only string arrays with elements trimmed with `String.Trim()` can sort --- -B +`String.Trim()` removes leading white space that would sort before numbers and letters. --- -C - ---- - -D - ---- - -E +The array sort is noticeably faster using `String.Trim()` on each element. ## --video-solution-- -4 +2 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/choose-the-correct-data-type-in-your-c-sharp-code.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/choose-the-correct-data-type-in-your-c-sharp-code.md index 6e68f605ebd..e09de18d4c6 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/choose-the-correct-data-type-in-your-c-sharp-code.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/choose-the-correct-data-type-in-your-c-sharp-code.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +A piece of code must store whole numeric values between negative and positive `1,000,000`. Which data type should you choose? ## --answers-- -A +float --- -B +double --- -C - ---- - -D - ---- - -E +int ## --video-solution-- -4 +3 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/convert-data-types-using-casting-and-conversion-techniques-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/convert-data-types-using-casting-and-conversion-techniques-in-c-sharp.md index d0b18e15ea5..c725b3d0d0f 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/convert-data-types-using-casting-and-conversion-techniques-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/convert-data-types-using-casting-and-conversion-techniques-in-c-sharp.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +What type of action is being performed when changing a `float` into an `int`? ## --answers-- -A +A narrowing conversion. --- -B +A widening conversion. --- -C - ---- - -D - ---- - -E +An illegal conversion. ## --video-solution-- -4 +1 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/format-alphanumeric-data-for-presentation-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/format-alphanumeric-data-for-presentation-in-c-sharp.md index 6d404e9d165..8816bc85664 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/format-alphanumeric-data-for-presentation-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/format-alphanumeric-data-for-presentation-in-c-sharp.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +For the C# code `Console.WriteLine("C110".PadLeft(6, '0'));`, which is the expected output? ## --answers-- -A +`C11000` --- -B +`C110000000` --- -C - ---- - -D - ---- - -E +`00C110` ## --video-solution-- -4 +3 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/guided-project-work-with-variable-data-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/guided-project-work-with-variable-data-in-c-sharp.md index 1598a53c9ac..93434f444bb 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/guided-project-work-with-variable-data-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/guided-project-work-with-variable-data-in-c-sharp.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +For the code `decimal.TryParse(numberString, out myConvert))` when the type of `numberString` is a String. Which best describes the value type for `myConvert` when the `TryParse()` is successful? ## --answers-- -A +A string representing numeric digits. --- -B +A Boolean value. --- -C - ---- - -D - ---- - -E +A decimal ## --video-solution-- -4 +3 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/modify-the-content-of-string-using-built-in-string-data-type-methods-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/modify-the-content-of-string-using-built-in-string-data-type-methods-in-c-sharp.md index 4d91befb082..9442a11acf4 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/modify-the-content-of-string-using-built-in-string-data-type-methods-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/modify-the-content-of-string-using-built-in-string-data-type-methods-in-c-sharp.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +Which method finds the next index of either the `-` char, the `=` char, or the `_` char? ## --answers-- -A +`IndexOfAny()` --- -B +`Remove()` --- -C - ---- - -D - ---- - -E +`IndexOf()` ## --video-solution-- -4 +1 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/perform-operations-on-arrays-using-helpers-methods-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/perform-operations-on-arrays-using-helpers-methods-in-c-sharp.md index bf7e50f8f00..dee0b400b35 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/perform-operations-on-arrays-using-helpers-methods-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/work-with-variable-data-in-c-sharp-console-applications/perform-operations-on-arrays-using-helpers-methods-in-c-sharp.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +Which method changes the order of items in an `string` array? ## --answers-- -A +`myArray.Resize()` --- -B +`myArray.Clear()` --- -C - ---- - -D - ---- - -E +`Array.Sort()` ## --video-solution-- -4 +3 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/guided-project-calculate-and-print-student-grades.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/guided-project-calculate-and-print-student-grades.md index 0b8a90caa77..de2cf0636e2 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/guided-project-calculate-and-print-student-grades.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/guided-project-calculate-and-print-student-grades.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +What is wrong with the following code? `int sophiaSum; Console.WriteLine("Sophia: " + sophiaSum);` ## --answers-- -A +`sophiaSum` is not initialized before use --- -B +`sophiaSum` is not implicitly typed to a string --- -C - ---- - -D - ---- - -E +`sophiaSum` should use the var keyword ## --video-solution-- -4 +1 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/guided-project-calculate-final-gpa.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/guided-project-calculate-final-gpa.md index 7ce788fdbf9..e60bdbdee43 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/guided-project-calculate-final-gpa.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/guided-project-calculate-final-gpa.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +Suppose `decimal gradePointAverage = 3.99872831;`. What is the value of `(int) gradePointAverage`? ## --answers-- -A +3.99 --- -B +4 --- -C - ---- - -D - ---- - -E +3 ## --video-solution-- -4 +3 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/perform-basic-operations-on-numbers-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/perform-basic-operations-on-numbers-in-c-sharp.md index 521d282e970..b33377a6cc3 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/perform-basic-operations-on-numbers-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/perform-basic-operations-on-numbers-in-c-sharp.md @@ -16,28 +16,24 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +What is the value of the following result? `int result = 3 + 1 * 5 / 2;` ## --answers-- -A +10 --- -B +5 --- -C +6 --- -D - ---- - -E +5.5 ## --video-solution-- -4 +2 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/perform-basic-string-formatting-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/perform-basic-string-formatting-in-c-sharp.md index 74da29c3a6b..315f01968fa 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/perform-basic-string-formatting-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/perform-basic-string-formatting-in-c-sharp.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +Which of the following lines of code correctly uses string interpolation assuming that the variable `value` is a string? ## --answers-- -A +'`Console.WriteLine(@"My value: {value}");'`' --- -B +'`Console.WriteLine($"My value: {value}");`' --- -C - ---- - -D - ---- - -E +'`Console.WriteLine(@"My value: [value]");`' ## --video-solution-- -4 +2 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/store-and-retrieve-data-using-literal-and-variable-values-in-c-sharp.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/store-and-retrieve-data-using-literal-and-variable-values-in-c-sharp.md index 88168a2891d..7a4ba822e34 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/store-and-retrieve-data-using-literal-and-variable-values-in-c-sharp.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/store-and-retrieve-data-using-literal-and-variable-values-in-c-sharp.md @@ -16,28 +16,20 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +Which of the following lines of code creates a variable correctly? ## --answers-- -A +`int x = 12.3m;` --- -B +`decimal x = 12.3m;` --- -C - ---- - -D - ---- - -E +`bool x = 'False';` ## --video-solution-- -4 +2 diff --git a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/write-your-first-c-sharp-code.md b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/write-your-first-c-sharp-code.md index ea4055137a1..68b473a5c43 100644 --- a/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/write-your-first-c-sharp-code.md +++ b/curriculum/challenges/english/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/write-your-first-c-sharp-code.md @@ -16,28 +16,24 @@ This challenge will be partially completed on Microsoft's learn platform. Follow ## --text-- -What is C#? +What is the difference between `Console.Write` and `Console.WriteLine`? ## --answers-- -A +`Console.Write` prints the output on a new line. --- -B +`Console.WriteLine` prints the output on a new line. --- -C +`Console.WriteLine` appends a new line after the output. --- -D - ---- - -E +There is no difference. ## --video-solution-- -4 +3