mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-09-24 23:01:18 +08:00
chore(i18n,learn): processed translations (#51762)
This commit is contained in:
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-do-while/" target="_blank" rel="noreferrer">Add Looping Logic to Your Code Using the `do`-`while` and `while` Statements in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
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?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-switch-case/" target="_blank" rel="noreferrer">Branch the Flow of Code Using the `switch`-`case` Construct in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
What is the purpose of the `break` keyword?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/challenge-project-develop-branching-looping-structures-c-sharp/" target="_blank" rel="noreferrer">Develop Branching and Looping Structures in C#</a> challenge project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
A developer needs to create an iteration statement. Under what condition is a `while` statement a better choice than a `do` statement?
|
||||
|
||||
+8
-4
@@ -14,21 +14,25 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-code-blocks/" target="_blank" rel="noreferrer">Control Variable Scope and Logic Using Code Blocks in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following describes the affect of a `using` statement?
|
||||
Which of the following statements is true about showing/removing the curly braces for code blocks associated with an `if` statement?
|
||||
|
||||
## --answers--
|
||||
|
||||
Affects only the first code block in the code file.
|
||||
The curly braces can't be removed from the code block for `else if` and `else` statements.
|
||||
|
||||
---
|
||||
|
||||
Affects only the current code block in the code file.
|
||||
If the curly braces are removed from the code blocks of an `if-elseif-else`, the white space must also be removed.
|
||||
|
||||
---
|
||||
|
||||
Affects all of the code in the code file.
|
||||
Always choose a style that improves readability.
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-evaluate-boolean-expressions/" target="_blank" rel="noreferrer">Evaluate Boolean Expressions to Make Decisions in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following lines of code is a valid use of the conditional operator?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/guided-project-develop-conditional-branching-looping/" target="_blank" rel="noreferrer">Develop Conditional Branching and Looping Structures in C#</a> guided project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
When is it appropriate to use a `switch-case` construct rather than a `if-elseif-else` construct?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-for/" target="_blank" rel="noreferrer">Iterate Through a Code Block Using the `for` Statement in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following `for` statements is correct?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-if-elseif-else/" target="_blank" rel="noreferrer">Add Decision Logic to Your Code Using `if`, `else`, and `else if` Statements in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the choices below is not a valid operator in C#?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-call-methods/" target="_blank" rel="noreferrer">Call Methods from the .NET Class Library Using C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
What is an object?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/challenge-project-arrays-iteration-selection/" target="_blank" rel="noreferrer">Develop `foreach` and `if`-`elseif`-`else` Structures to Process Array Data in C#</a> challenge project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
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?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-readable-code/" target="_blank" rel="noreferrer">Create Readable Code with Conventions, Whitespace, and Comments in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following is a bad reason to use a code comment?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/guided-project-arrays-iteration-selection/" target="_blank" rel="noreferrer">Develop `foreach` and `if`-`elseif`-`else` Structures to Process Array Data in C#</a> guided project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
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?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/install-configure-visual-studio-code/" target="_blank" rel="noreferrer">Install and Configure Visual Studio Code</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following choices provides the best description of an Integrated Development Environment (IDE)?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-arrays/" target="_blank" rel="noreferrer">Store and Iterate Through Sequences of Data Using Arrays and the `foreach` Statement in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following foreach statements is syntactically correct?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/challenge-project-create-mini-game/" target="_blank" rel="noreferrer">Create a Mini-Game</a> challenge project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
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?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/create-c-sharp-methods-return-values/" target="_blank" rel="noreferrer">Create C# Methods that Return Values</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following options correctly returns a `string` value?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/create-c-sharp-methods-parameters/" target="_blank" rel="noreferrer">Create C# Methods with Parameters</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Given the method signature,
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/guided-project-visit-petting-zoo/" target="_blank" rel="noreferrer">Plan a Petting Zoo Visit</a> guided project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
What is the purpose of defining an optional parameter in a method?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/write-first-c-sharp-method/" target="_blank" rel="noreferrer">Write Your First C# Method</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following correctly declares a method?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/challenge-project-debug-c-sharp-console-application/" target="_blank" rel="noreferrer">Debug a C# Console Application Using Visual Studio Code</a> challenge project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following options can be used set a breakpoint in Visual Studio Code?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/create-throw-exceptions-c-sharp/" target="_blank" rel="noreferrer">Create and Throw Exceptions in C# Console Applications</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
When should a method throw an exception?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/guided-project-debug-handle-exceptions-c-sharp-console-application/" target="_blank" rel="noreferrer">Debug and Handle Exceptions in a C# Console Application Using Visual Studio Code</a> guided project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
When is an `ArgumentOutOfRangeException` exception thrown?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/implement-exception-handling-c-sharp/" target="_blank" rel="noreferrer">Implement Exception Handling in C# Console Applications</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
When is an `ArrayTypeMismatchException` exception thrown?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/implement-visual-studio-code-debugging-tools/" target="_blank" rel="noreferrer">Implement the Visual Studio Code Debugging Tools for C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which section of the RUN AND DEBUG view is used to track the current point of execution within the running application?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/review-principles-code-debugging-exception-handling-c-sharp/" target="_blank" rel="noreferrer">Review the Principles of Code Debugging and Exception Handling</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
What is the relationship between the type of exception and the information it contains?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/challenge-project-work-variable-data-c-sharp/" target="_blank" rel="noreferrer">Work with Variable Data in C#</a> challenge project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
To sort a string array, why is it important to use the `String.Trim()` method on each array element before sorting?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-choose-data-type/" target="_blank" rel="noreferrer">Choose the Correct Data Type in Your C# Code</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
A piece of code must store whole numeric values between negative and positive `1,000,000`. Which data type should you choose?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-convert-cast/" target="_blank" rel="noreferrer">Convert Data Types Using Casting and Conversion Techniques in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
What type of action is being performed when changing a `float` into an `int`?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-format-strings/" target="_blank" rel="noreferrer">Format Alphanumeric Data for Presentation in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
For the C# code `Console.WriteLine("C110".PadLeft(6, '0'));`, which is the expected output?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/guided-project-work-variable-data-c-sharp/" target="_blank" rel="noreferrer">Work with Variable Data in C#</a> guided project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
For the code `decimal.TryParse(numberString, out myConvert))` when the type of `numberString` is a String.
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-modify-content/" target="_blank" rel="noreferrer">Modify the Content of Strings Using Built-In String Data Type Methods in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which method finds the next index of either the `-` char, the `=` char, or the `_` char?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-arrays-operations/" target="_blank" rel="noreferrer">Perform Operations on Arrays Using Helper Methods in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which method changes the order of items in an `string` array?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/guided-project-calculate-print-student-grades/" target="_blank" rel="noreferrer">Calculate and Print Student Grades</a> guided project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
What is wrong with the following code?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/guided-project-calculate-final-gpa/" target="_blank" rel="noreferrer">Calculate Final GPA</a> guided project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Suppose `decimal gradePointAverage = 3.99872831m;`.
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-basic-operations/" target="_blank" rel="noreferrer">Perform Basic Operations on Numbers in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
What is the value of the following result?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-basic-formatting/" target="_blank" rel="noreferrer">Perform Basic String Formatting in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following lines of code correctly uses string interpolation assuming that the variable `value` is a string?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-literals-variables/" target="_blank" rel="noreferrer">Store and Retrieve Data Using Literal and Variable Values in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following lines of code creates a variable correctly?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-write-first/" target="_blank" rel="noreferrer">Write Your First C# Code</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
What is the difference between `Console.Write` and `Console.WriteLine`?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-do-while/" target="_blank" rel="noreferrer">Add Looping Logic to Your Code Using the `do`-`while` and `while` Statements in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
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?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-switch-case/" target="_blank" rel="noreferrer">Branch the Flow of Code Using the `switch`-`case` Construct in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
What is the purpose of the `break` keyword?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/challenge-project-develop-branching-looping-structures-c-sharp/" target="_blank" rel="noreferrer">Develop Branching and Looping Structures in C#</a> challenge project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
A developer needs to create an iteration statement. Under what condition is a `while` statement a better choice than a `do` statement?
|
||||
|
||||
+8
-4
@@ -14,21 +14,25 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-code-blocks/" target="_blank" rel="noreferrer">Control Variable Scope and Logic Using Code Blocks in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following describes the affect of a `using` statement?
|
||||
Which of the following statements is true about showing/removing the curly braces for code blocks associated with an `if` statement?
|
||||
|
||||
## --answers--
|
||||
|
||||
Affects only the first code block in the code file.
|
||||
The curly braces can't be removed from the code block for `else if` and `else` statements.
|
||||
|
||||
---
|
||||
|
||||
Affects only the current code block in the code file.
|
||||
If the curly braces are removed from the code blocks of an `if-elseif-else`, the white space must also be removed.
|
||||
|
||||
---
|
||||
|
||||
Affects all of the code in the code file.
|
||||
Always choose a style that improves readability.
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-evaluate-boolean-expressions/" target="_blank" rel="noreferrer">Evaluate Boolean Expressions to Make Decisions in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following lines of code is a valid use of the conditional operator?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/guided-project-develop-conditional-branching-looping/" target="_blank" rel="noreferrer">Develop Conditional Branching and Looping Structures in C#</a> guided project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
When is it appropriate to use a `switch-case` construct rather than a `if-elseif-else` construct?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-for/" target="_blank" rel="noreferrer">Iterate Through a Code Block Using the `for` Statement in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following `for` statements is correct?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-if-elseif-else/" target="_blank" rel="noreferrer">Add Decision Logic to Your Code Using `if`, `else`, and `else if` Statements in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the choices below is not a valid operator in C#?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-call-methods/" target="_blank" rel="noreferrer">Call Methods from the .NET Class Library Using C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
What is an object?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/challenge-project-arrays-iteration-selection/" target="_blank" rel="noreferrer">Develop `foreach` and `if`-`elseif`-`else` Structures to Process Array Data in C#</a> challenge project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
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?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-readable-code/" target="_blank" rel="noreferrer">Create Readable Code with Conventions, Whitespace, and Comments in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following is a bad reason to use a code comment?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/guided-project-arrays-iteration-selection/" target="_blank" rel="noreferrer">Develop `foreach` and `if`-`elseif`-`else` Structures to Process Array Data in C#</a> guided project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
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?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/install-configure-visual-studio-code/" target="_blank" rel="noreferrer">Install and Configure Visual Studio Code</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following choices provides the best description of an Integrated Development Environment (IDE)?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-arrays/" target="_blank" rel="noreferrer">Store and Iterate Through Sequences of Data Using Arrays and the `foreach` Statement in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following foreach statements is syntactically correct?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/challenge-project-create-mini-game/" target="_blank" rel="noreferrer">Create a Mini-Game</a> challenge project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
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?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/create-c-sharp-methods-return-values/" target="_blank" rel="noreferrer">Create C# Methods that Return Values</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following options correctly returns a `string` value?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/create-c-sharp-methods-parameters/" target="_blank" rel="noreferrer">Create C# Methods with Parameters</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Given the method signature,
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/guided-project-visit-petting-zoo/" target="_blank" rel="noreferrer">Plan a Petting Zoo Visit</a> guided project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
What is the purpose of defining an optional parameter in a method?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/write-first-c-sharp-method/" target="_blank" rel="noreferrer">Write Your First C# Method</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following correctly declares a method?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/challenge-project-debug-c-sharp-console-application/" target="_blank" rel="noreferrer">Debug a C# Console Application Using Visual Studio Code</a> challenge project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following options can be used set a breakpoint in Visual Studio Code?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/create-throw-exceptions-c-sharp/" target="_blank" rel="noreferrer">Create and Throw Exceptions in C# Console Applications</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
When should a method throw an exception?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/guided-project-debug-handle-exceptions-c-sharp-console-application/" target="_blank" rel="noreferrer">Debug and Handle Exceptions in a C# Console Application Using Visual Studio Code</a> guided project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
When is an `ArgumentOutOfRangeException` exception thrown?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/implement-exception-handling-c-sharp/" target="_blank" rel="noreferrer">Implement Exception Handling in C# Console Applications</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
When is an `ArrayTypeMismatchException` exception thrown?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/implement-visual-studio-code-debugging-tools/" target="_blank" rel="noreferrer">Implement the Visual Studio Code Debugging Tools for C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which section of the RUN AND DEBUG view is used to track the current point of execution within the running application?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/review-principles-code-debugging-exception-handling-c-sharp/" target="_blank" rel="noreferrer">Review the Principles of Code Debugging and Exception Handling</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
What is the relationship between the type of exception and the information it contains?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/challenge-project-work-variable-data-c-sharp/" target="_blank" rel="noreferrer">Work with Variable Data in C#</a> challenge project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
To sort a string array, why is it important to use the `String.Trim()` method on each array element before sorting?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-choose-data-type/" target="_blank" rel="noreferrer">Choose the Correct Data Type in Your C# Code</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
A piece of code must store whole numeric values between negative and positive `1,000,000`. Which data type should you choose?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-convert-cast/" target="_blank" rel="noreferrer">Convert Data Types Using Casting and Conversion Techniques in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
What type of action is being performed when changing a `float` into an `int`?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-format-strings/" target="_blank" rel="noreferrer">Format Alphanumeric Data for Presentation in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
For the C# code `Console.WriteLine("C110".PadLeft(6, '0'));`, which is the expected output?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/guided-project-work-variable-data-c-sharp/" target="_blank" rel="noreferrer">Work with Variable Data in C#</a> guided project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
For the code `decimal.TryParse(numberString, out myConvert))` when the type of `numberString` is a String.
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-modify-content/" target="_blank" rel="noreferrer">Modify the Content of Strings Using Built-In String Data Type Methods in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which method finds the next index of either the `-` char, the `=` char, or the `_` char?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-arrays-operations/" target="_blank" rel="noreferrer">Perform Operations on Arrays Using Helper Methods in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which method changes the order of items in an `string` array?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/guided-project-calculate-print-student-grades/" target="_blank" rel="noreferrer">Calculate and Print Student Grades</a> guided project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
What is wrong with the following code?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/guided-project-calculate-final-gpa/" target="_blank" rel="noreferrer">Calculate Final GPA</a> guided project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Suppose `decimal gradePointAverage = 3.99872831m;`.
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-basic-operations/" target="_blank" rel="noreferrer">Perform Basic Operations on Numbers in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
What is the value of the following result?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-basic-formatting/" target="_blank" rel="noreferrer">Perform Basic String Formatting in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following lines of code correctly uses string interpolation assuming that the variable `value` is a string?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-literals-variables/" target="_blank" rel="noreferrer">Store and Retrieve Data Using Literal and Variable Values in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following lines of code creates a variable correctly?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ dashedName: write-your-first-c-sharp-code
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-write-first/" target="_blank" rel="noreferrer">Write Your First C# Code</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
`Console.Write` 和 `Console.WriteLine`有什麼區別?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-do-while/" target="_blank" rel="noreferrer">Add Looping Logic to Your Code Using the `do`-`while` and `while` Statements in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
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?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-switch-case/" target="_blank" rel="noreferrer">Branch the Flow of Code Using the `switch`-`case` Construct in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
What is the purpose of the `break` keyword?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/challenge-project-develop-branching-looping-structures-c-sharp/" target="_blank" rel="noreferrer">Develop Branching and Looping Structures in C#</a> challenge project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
A developer needs to create an iteration statement. Under what condition is a `while` statement a better choice than a `do` statement?
|
||||
|
||||
+8
-4
@@ -14,21 +14,25 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-code-blocks/" target="_blank" rel="noreferrer">Control Variable Scope and Logic Using Code Blocks in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following describes the affect of a `using` statement?
|
||||
Which of the following statements is true about showing/removing the curly braces for code blocks associated with an `if` statement?
|
||||
|
||||
## --answers--
|
||||
|
||||
Affects only the first code block in the code file.
|
||||
The curly braces can't be removed from the code block for `else if` and `else` statements.
|
||||
|
||||
---
|
||||
|
||||
Affects only the current code block in the code file.
|
||||
If the curly braces are removed from the code blocks of an `if-elseif-else`, the white space must also be removed.
|
||||
|
||||
---
|
||||
|
||||
Affects all of the code in the code file.
|
||||
Always choose a style that improves readability.
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-evaluate-boolean-expressions/" target="_blank" rel="noreferrer">Evaluate Boolean Expressions to Make Decisions in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following lines of code is a valid use of the conditional operator?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/guided-project-develop-conditional-branching-looping/" target="_blank" rel="noreferrer">Develop Conditional Branching and Looping Structures in C#</a> guided project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
When is it appropriate to use a `switch-case` construct rather than a `if-elseif-else` construct?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-for/" target="_blank" rel="noreferrer">Iterate Through a Code Block Using the `for` Statement in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following `for` statements is correct?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-if-elseif-else/" target="_blank" rel="noreferrer">Add Decision Logic to Your Code Using `if`, `else`, and `else if` Statements in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the choices below is not a valid operator in C#?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-call-methods/" target="_blank" rel="noreferrer">Call Methods from the .NET Class Library Using C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
What is an object?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/challenge-project-arrays-iteration-selection/" target="_blank" rel="noreferrer">Develop `foreach` and `if`-`elseif`-`else` Structures to Process Array Data in C#</a> challenge project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
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?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-readable-code/" target="_blank" rel="noreferrer">Create Readable Code with Conventions, Whitespace, and Comments in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following is a bad reason to use a code comment?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/guided-project-arrays-iteration-selection/" target="_blank" rel="noreferrer">Develop `foreach` and `if`-`elseif`-`else` Structures to Process Array Data in C#</a> guided project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
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?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/install-configure-visual-studio-code/" target="_blank" rel="noreferrer">Install and Configure Visual Studio Code</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following choices provides the best description of an Integrated Development Environment (IDE)?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/csharp-arrays/" target="_blank" rel="noreferrer">Store and Iterate Through Sequences of Data Using Arrays and the `foreach` Statement in C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following foreach statements is syntactically correct?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/challenge-project-create-mini-game/" target="_blank" rel="noreferrer">Create a Mini-Game</a> challenge project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
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?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/create-c-sharp-methods-return-values/" target="_blank" rel="noreferrer">Create C# Methods that Return Values</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following options correctly returns a `string` value?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/create-c-sharp-methods-parameters/" target="_blank" rel="noreferrer">Create C# Methods with Parameters</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Given the method signature,
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/guided-project-visit-petting-zoo/" target="_blank" rel="noreferrer">Plan a Petting Zoo Visit</a> guided project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
What is the purpose of defining an optional parameter in a method?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/write-first-c-sharp-method/" target="_blank" rel="noreferrer">Write Your First C# Method</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following correctly declares a method?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/challenge-project-debug-c-sharp-console-application/" target="_blank" rel="noreferrer">Debug a C# Console Application Using Visual Studio Code</a> challenge project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following options can be used set a breakpoint in Visual Studio Code?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/create-throw-exceptions-c-sharp/" target="_blank" rel="noreferrer">Create and Throw Exceptions in C# Console Applications</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
When should a method throw an exception?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/guided-project-debug-handle-exceptions-c-sharp-console-application/" target="_blank" rel="noreferrer">Debug and Handle Exceptions in a C# Console Application Using Visual Studio Code</a> guided project on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
When is an `ArgumentOutOfRangeException` exception thrown?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/implement-exception-handling-c-sharp/" target="_blank" rel="noreferrer">Implement Exception Handling in C# Console Applications</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
When is an `ArrayTypeMismatchException` exception thrown?
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ This challenge will be partially completed on the Microsoft Learn platform. Foll
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the <a href="https://learn.microsoft.com/training/modules/implement-visual-studio-code-debugging-tools/" target="_blank" rel="noreferrer">Implement the Visual Studio Code Debugging Tools for C#</a> module on Microsoft Learn. Then, answer the question below.
|
||||
|
||||
## --text--
|
||||
|
||||
Which section of the RUN AND DEBUG view is used to track the current point of execution within the running application?
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user