Skip to content

Commit 6eea02b

Browse files
authored
Merge pull request #50950 from wwlpublish/bd6c74eede943b72726f38401504fe62564a89bd1bde7ce7db0e7c9ccc8efee3-live
Modules/M06-guided-project-arrays-iteration-selection
2 parents 1d717df + 384c348 commit 6eea02b

11 files changed

+39
-38
lines changed

learn-pr/wwl-language/guided-project-arrays-iteration-selection/1-introduction.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Introduction
44
metadata:
55
title: Introduction
66
description: "Introduction"
7-
ms.date: 12/12/2024
7+
ms.date: 06/16/2025
88
author: wwlpublish
99
ms.author: cahowd
1010
ms.topic: unit

learn-pr/wwl-language/guided-project-arrays-iteration-selection/2-prepare.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Prepare
44
metadata:
55
title: Prepare
66
description: "Prepare"
7-
ms.date: 12/12/2024
7+
ms.date: 06/16/2025
88
author: wwlpublish
99
ms.author: cahowd
1010
ms.topic: unit

learn-pr/wwl-language/guided-project-arrays-iteration-selection/3-exercise-create-arrays-foreach-loops.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Exercise - Create arrays and foreach loops
44
metadata:
55
title: Exercise - Create arrays and foreach loops
66
description: "Exercise - Create arrays and foreach loops"
7-
ms.date: 12/12/2024
7+
ms.date: 06/16/2025
88
author: wwlpublish
99
ms.author: cahowd
1010
ms.topic: unit

learn-pr/wwl-language/guided-project-arrays-iteration-selection/4-exercise-construct-nested-loops.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Exercise - Construct a nested loop structure for student grade calculatio
44
metadata:
55
title: Exercise - Construct a nested loop structure for student grade calculations
66
description: "Exercise - Construct a nested loop structure for student grade calculations"
7-
ms.date: 12/12/2024
7+
ms.date: 06/16/2025
88
author: wwlpublish
99
ms.author: cahowd
1010
ms.topic: unit

learn-pr/wwl-language/guided-project-arrays-iteration-selection/5-exercise-implement-selection-statements.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Exercise - Implement code branches using selection statements
44
metadata:
55
title: Exercise - Implement code branches using selection statements
66
description: "Exercise - Implement code branches using selection statements"
7-
ms.date: 12/12/2024
7+
ms.date: 06/16/2025
88
author: wwlpublish
99
ms.author: cahowd
1010
ms.topic: unit

learn-pr/wwl-language/guided-project-arrays-iteration-selection/6-knowledge-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Module assessment
44
metadata:
55
title: Module assessment
66
description: "Knowledge check"
7-
ms.date: 12/12/2024
7+
ms.date: 06/16/2025
88
author: wwlpublish
99
ms.author: cahowd
1010
ms.topic: unit

learn-pr/wwl-language/guided-project-arrays-iteration-selection/7-summary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Summary
44
metadata:
55
title: Summary
66
description: "Summary"
7-
ms.date: 12/12/2024
7+
ms.date: 06/16/2025
88
author: wwlpublish
99
ms.author: cahowd
1010
ms.topic: unit

learn-pr/wwl-language/guided-project-arrays-iteration-selection/includes/3-exercise-create-arrays-foreach-loops.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
In this exercise, you'll review the Starter project code and then begin updating the application. Your first coding task will be creating the arrays that hold student exam scores. Once your application data is available in arrays, you'll begin working on a `foreach` loop that can be used to sum student grades. The detailed tasks that you'll complete during this exercise are:
1+
In this exercise, you review the Starter project code and then begin updating the application. Your first coding task is creating the arrays that hold student exam scores. Once your application data is available in arrays, you begin working on a `foreach` loop that can be used to sum student grades. The detailed tasks that you complete during this exercise are:
22

3-
1. Code review: review the contents of the Program.cs file.
3+
1. Code review: review the contents of the Program.cs file.
44

55
1. Arrays: Create the arrays that store each student's assignment scores.
66

@@ -15,17 +15,17 @@ In this exercise, you'll review the Starter project code and then begin updating
1515
1616
## Review the contents of the Program.cs file
1717

18-
In this task, you'll review the code that's provided as a Starter project for this module. The Program.cs file contains the initial version of the student grading application that you'll be updating.
18+
In this task, you review the code that's provided as a Starter project for this module. The Program.cs file contains the initial version of the student grading application that you are updating.
1919

2020
1. Ensure that you have the **GuidedProject** folder open in Visual Studio Code.
2121

2222
The Prepare unit (the previous unit in this module) includes a Setup section for this Guided project module. The Setup section describes the process for downloading your initial code and opening the project folder Visual Studio Code. If necessary, go back and follow the Setup instructions.
2323

24-
1. In the Visual Studio Code EXPLORER panel, expand the **Starter** folder, then select **Program.cs**.
24+
1. In the Visual Studio Code EXPLORER view, expand the **Starter** folder, then select **Program.cs**.
2525

26-
When you select the Program.cs file, the file contents will open in the main Editor area to the right of the EXPLORER panel.
26+
When you select the Program.cs file, the file contents open in the main Editor area to the right of the EXPLORER view.
2727

28-
If the EXPLORER panel isn't open, you can open it using the Activity Bar on the far-left side of the Visual Studio Code window. The EXPLORER button is the topmost icon on the Activity Bar.
28+
If the EXPLORER view isn't open, you can open it using the Activity Bar on the far-left side of the Visual Studio Code window. The EXPLORER button is the topmost icon on the Activity Bar.
2929

3030
1. Take a few minutes to review the code in the Program.cs file.
3131

@@ -119,14 +119,14 @@ In this task, you'll review the code that's provided as a Starter project for th
119119

120120
This section prints the formatted output in accordance with the teacher's guidelines. The first line is a header line with column titles, followed by the names and scores for each student.
121121

122-
The `Console.ReadLine()` statement will pause the application so that the application user can review the output.
122+
The `Console.ReadLine()` statement pauses the application so that the application user can review the output.
123123

124-
1. In the Visual Studio Code EXPLORER panel, right-click **Starter**, and then select **Open in Integrated Terminal**.
124+
1. In the Visual Studio Code EXPLORER view, right-click **Starter**, and then select **Open in Integrated Terminal**.
125125

126-
You will be using the TERMINAL panel to run .NET Command Line Interface (CLI) commands, such as `dotnet build` and `dotnet run`. The `dotnet build` command will compile your code and display error and warning messages related to your code syntax.
126+
You are using the TERMINAL panel to run .NET Command Line Interface (CLI) commands, such as `dotnet build` and `dotnet run`. The `dotnet build` command compiles your code and display error and warning messages related to your code syntax.
127127

128128
> [!IMPORTANT]
129-
> Ensure that terminal command prompt is open to the root of your project workspace. In this case, the root of your project workspace is the Starter folder, where your Starter.csproj and Program.cs files are located. When you run .NET CLI commands in the terminal, the commands will try to perform actions using the current folder location. If you try to run the `dotnet build` or `dotnet run` commands from a folder location that does not contain your files, the commands will generate error messages.
129+
> Ensure that terminal command prompt is open to the root of your project workspace. In this case, the root of your project workspace is the Starter folder, where your Starter.csproj and Program.cs files are located. When you run .NET CLI commands in the terminal, the commands try to perform actions using the current folder location. If you try to run the `dotnet build` or `dotnet run` commands from a folder location that does not contain your files, the commands generate error messages.
130130

131131
1. At the TERMINAL command prompt, to build your project code, enter the following command: `dotnet build`
132132

@@ -146,7 +146,7 @@ In this task, you'll review the code that's provided as a Starter project for th
146146

147147
1. At the Terminal command prompt, type **dotnet run** and then press Enter.
148148

149-
The `dotnet run` command will instruct the compiler to build your application and then, as long as there were no build errors, it will run your compiled code.
149+
The `dotnet run` command instructs the compiler to build your application and then, as long as there were no build errors, it runs your compiled code.
150150

151151
> [!IMPORTANT]
152152
> The Starter project targets .NET 8 (in the Starter.csproj file). If you don't have .NET 8 installed, the `dotnet run` command will generate an error. You can either install the .NET 8 SDK (recommended), or you can change the target framework in the Starter.csproj file to align with the version of .NET that you have installed in your environment.
@@ -391,7 +391,7 @@ In this task, you'll run the application to verify that your code logic is worki
391391

392392
1. Ensure that you've saved your changes to the Program.cs file.
393393

394-
1. In the Visual Studio Code EXPLORER panel, right-click **Starter**, and then select **Open in Integrated Terminal**.
394+
1. In the Visual Studio Code EXPLORER view, right-click **Starter**, and then select **Open in Integrated Terminal**.
395395

396396
You will be using the Terminal panel to enter .NET CLI commands that build and run your applications.
397397

learn-pr/wwl-language/guided-project-arrays-iteration-selection/includes/4-exercise-construct-nested-loops.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
In this exercise, you'll add a string array to hold the student names, and then implement a nested `foreach` structure that iterates through the student names in an outer loop and student scores in the inner loop. You'll begin by constructing the `studentNames` array and a `foreach` loop that iterates through the array elements. Next, you'll move the code that's used to calculate Sophia's grades into the code block of the "names" loop. Finally, you'll implement the code logic that uses the student's name to access their scores array, calculate their average score, and write their grade to the console. The detailed tasks that you'll complete during this exercise are:
1+
In this exercise, you add a string array to hold the student names, and then implement a nested `foreach` structure that iterates through the student names in an outer loop and student scores in the inner loop. You begin by constructing the `studentNames` array and a `foreach` loop that iterates through the array elements. Next, you move the code that's used to calculate Sophia's grades into the code block of the "names" loop. Finally, you implement the code logic that uses the student's name to access their scores array, calculate their average score, and write their grade to the console. The detailed tasks that you complete during this exercise are:
22

33
1. Create names array: Create a student names array.
44

@@ -76,14 +76,14 @@ In this task, you'll create a student names array and a `foreach` loop that iter
7676

7777
1. On the Visual Studio Code **File** menu, click **Save**.
7878

79-
1. In the Visual Studio Code EXPLORER panel, right-click **Starter**, and then select **Open in Integrated Terminal**.
79+
1. In the Visual Studio Code EXPLORER view, right-click **Starter**, and then select **Open in Integrated Terminal**.
8080

8181
> [!IMPORTANT]
8282
> The Terminal command prompt must be displaying the folder path for your Program.cs file.
8383

8484
1. At the Terminal command prompt, type **dotnet build** and then press Enter.
8585

86-
The `dotnet build` command instructs the compiler to build the application. If any errors are detected, they will be reported.
86+
The `dotnet build` command instructs the compiler to build the application. If any errors are detected, they'll be reported.
8787

8888
1. If you see Error or Warning messages, you need to fix them before continuing.
8989

@@ -185,7 +185,7 @@ In this task, you'll relocate the code that calculates and reports Sophia's scor
185185
Console.ReadLine();
186186
```
187187

188-
Notice that at this point, your code will calculate and report Sophia's score regardless of the `name` of the current student. You will address that shortly.
188+
Notice that at this point, your code will calculate and report Sophia's score regardless of the `name` of the current student. You'll address that shortly.
189189

190190
1. Delete the following code:
191191

@@ -257,14 +257,14 @@ In this task, you'll relocate the code that calculates and reports Sophia's scor
257257

258258
1. On the Visual Studio Code **File** menu, click **Save**.
259259

260-
1. In the Visual Studio Code EXPLORER panel, right-click **Starter**, and then select **Open in Integrated Terminal**.
260+
1. In the Visual Studio Code EXPLORER view, right-click **Starter**, and then select **Open in Integrated Terminal**.
261261

262262
> [!IMPORTANT]
263263
> The Terminal command prompt must be displaying the folder path for your Program.cs file.
264264

265265
1. At the Terminal command prompt, type **dotnet build** and then press Enter.
266266

267-
The `dotnet build` command instructs the compiler to build the application. If any errors are detected, they will be reported.
267+
The `dotnet build` command instructs the compiler to build the application. If any errors are detected, they'll be reported.
268268

269269
1. If you see Error or Warning messages, you need to fix them before continuing.
270270

@@ -314,7 +314,7 @@ In this task, you'll update the code that performs student score calculations us
314314
```
315315

316316
> [!NOTE]
317-
> You could continue to use `name` to track the name of the current student as you iterate through the names array, but using `currentName` will make it easier to understand your code logic as you build out your application in the upcoming steps.
317+
> You could continue to use `name` to track the name of the current student as you iterate through the names array, but using `currentStudent` will make it easier to understand your code logic as you build out your application in the upcoming steps.
318318

319319
1. To substitute `currentStudent` for `name` in the `if` statement that evaluates whether `name` is equal to Sophia, update your code as follows:
320320

@@ -503,7 +503,7 @@ In this task, you'll update the code that performs student score calculations us
503503
Console.WriteLine($"{currentStudent}\t\t{currentStudentGrade}\t?");
504504
```
505505

506-
Notice that this code has replaced the letter grade assignment with a "?". You will work on automating the assignment of letter grades in the next exercise.
506+
Notice that this code has replaced the letter grade assignment with a "?". You'll work on automating the assignment of letter grades in the next exercise.
507507

508508
1. Move the `Console.WriteLine` statement that's used to write the column labels of your score report to the location just above the outer `foreach` loop.
509509

@@ -574,7 +574,7 @@ In this task, you'll run the application to verify that your code logic is worki
574574

575575
1. Ensure that you've saved your changes to the Program.cs file.
576576

577-
1. In the Visual Studio Code EXPLORER panel, right-click **Starter**, and then select **Open in Integrated Terminal**.
577+
1. In the Visual Studio Code EXPLORER view, right-click **Starter**, and then select **Open in Integrated Terminal**.
578578

579579
1. At the Terminal command prompt, type **dotnet build** and then press Enter.
580580

@@ -598,4 +598,4 @@ In this task, you'll run the application to verify that your code logic is worki
598598

599599
1. Close the Terminal panel.
600600

601-
Congratulations, your application has come a long way from where you started out. You are making efficient use of arrays and `foreach` iterations, and you've integrated an `if` statement that enables your code to select the correct scores array.
601+
Congratulations, your application has come a long way from where you started out. You're making efficient use of arrays and `foreach` iterations, and you've integrated an `if` statement that enables your code to select the correct scores array.

learn-pr/wwl-language/guided-project-arrays-iteration-selection/includes/5-exercise-implement-selection-statements.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
In this exercise, you'll develop the code that automatically assigns a student's letter grade based on their final numeric score and you'll update the application so that extra credit project scores are factored into the student's final grade. You will begin by writing an `if-elseif-else` construct that can be used to evaluate the student's numeric score and assign the letter grade. Next, you'll examine the application requirements related to extra credit work, and then work your way through the required code updates. The detailed tasks that you'll complete during this exercise are:
1+
In this exercise, you develop the code that automatically assigns a student's letter grade based on their final numeric score and you update the application so that extra credit project scores are factored into the student's final grade. You begin by writing an `if-elseif-else` construct that can be used to evaluate the student's numeric score and assign the letter grade. Next, you examine the application requirements related to extra credit work, and then work your way through the required code updates. The detailed tasks that you complete during this exercise are:
22

33
1. Develop an `if-elseif-else` construct that evaluates the student's score to assign a letter grade. The expression that's evaluated compares the student's numeric score with a range of scores taken from a grading chart provided by the teacher.
44

5-
1. Integrate extra credit scores into each student's scores array, and then update the code that's used to calculate the student's numeric score. The `foreach` that's used to sum the student scores will be updated to include an `if` statement that branches the code. The exam scores will be applied to the sum in one branch, and the extra credit scores in the other branch.
5+
1. Integrate extra credit scores into each student's scores array, and then update the code that's used to calculate the student's numeric score. The `foreach` that's used to sum the student scores will be updated to include an `if` statement that branches the code. The exam scores are applied to the sum in one branch, and the extra credit scores in the other branch.
66

77
> [!IMPORTANT]
88
> You need to have completed this module's previous Exercise, "Create arrays and foreach loops", before you begin this Exercise.
99
1010
## Assign letter grades using an `if-elseif-else` construct
1111

12-
In this task, you'll develop an `if-elseif-else` structure that can be used to assign letter grades based on a calculated numeric score.
12+
In this task, you develop an `if-elseif-else` structure that can be used to assign letter grades based on a calculated numeric score.
1313

1414
1. Ensure that you have the Program.cs file open in the Visual Studio Code Editor.
1515

@@ -43,7 +43,7 @@ In this task, you'll develop an `if-elseif-else` structure that can be used to a
4343
0 - 59 F
4444
```
4545

46-
Notice that the top row of scores, the values greater than or equal to 97, have a letter grade of "A+". In other words, if a student's final score is >= 97, they'll be assigned a letter grade of "A+".
46+
Notice that the top row of scores, the values greater than or equal to 97, have a letter grade of "A+". In other words, if a student's final score is >= 97, they are assigned a letter grade of "A+".
4747

4848
1. To create an `if` statement that assigns `A+` to `currentStudentLetterGrade` when the student's score is greater than or equal to 97, enter the following code:
4949

@@ -258,7 +258,7 @@ In this task, you'll develop an `if-elseif-else` structure that can be used to a
258258

259259
1. On the Visual Studio Code **File** menu, click **Save**.
260260

261-
1. In the Visual Studio Code EXPLORER panel, right-click **Starter**, and then select **Open in Integrated Terminal**.
261+
1. In the Visual Studio Code EXPLORER view, right-click **Starter**, and then select **Open in Integrated Terminal**.
262262

263263
1. At the Terminal command prompt, type **dotnet build** and then press Enter.
264264

@@ -532,7 +532,7 @@ In this task, you'll run the application to verify that your code logic is worki
532532

533533
1. Ensure that you've saved your changes to the Program.cs file.
534534

535-
1. In the Visual Studio Code EXPLORER panel, right-click **Starter**, and then select **Open in Integrated Terminal**.
535+
1. In the Visual Studio Code EXPLORER view, right-click **Starter**, and then select **Open in Integrated Terminal**.
536536

537537
1. At the Terminal command prompt, type **dotnet build** and then press Enter.
538538

@@ -610,7 +610,7 @@ In this task, you'll run the application to verify that your code logic is worki
610610

611611
1. On the Visual Studio Code **File** menu, click **Save**.
612612

613-
1. In the Visual Studio Code EXPLORER panel, right-click **Starter**, and then select **Open in Integrated Terminal**.
613+
1. In the Visual Studio Code EXPLORER view, right-click **Starter**, and then select **Open in Integrated Terminal**.
614614

615615
1. At the Terminal command prompt, type **dotnet build** and then press Enter.
616616

0 commit comments

Comments
 (0)