Skip to content

Commit

Permalink
C# Guess The Word Workshop conversion to .Net Fiddle (#512)
Browse files Browse the repository at this point in the history
* C# Guess The Word Workship conversion to .Net Fiddle - Updating media and content files to refer to .Net Fiddle instead of Replit

* Guess the Word - updating screenshots and embedding .net fiddle, instead of launch button.

* Updated index.md to provide a description of .NET Fiddle,
Deleted starting-up.md since it was the same content as index.md.
  • Loading branch information
veronicagg authored Sep 20, 2024
1 parent 277a742 commit cbb7d74
Show file tree
Hide file tree
Showing 40 changed files with 34 additions and 63 deletions.
31 changes: 20 additions & 11 deletions content/english/csharp-guess-the-word/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,36 @@ The goal of today's activity is to learn C# skills and incorporate your new-foun

The goal of today's activity is to learn C# skills and incorporate your new-found knowledge to create a Guess The Word game! Let's get the game set up.

Today you will be using Replit. Before starting, you will need to sign up for a Replit account, if you do not yet have one.
Today you will be using .NET Fiddle, which is an online tool designed to help you learn, build, and run C# code.

Click the button below to sign up for a Replit account - you will need an email account in order to sign up. If you already have a Replit account, you can login to your account using the below button as well.
{{% notice tip %}}
Before starting, you can choose to sign up for a .NET Fiddle account, if you do not yet have one, and would like to save your work later.

<a class="my-2 mx-4 btn btn-info" href="https://replit.com/signup" target="_blank">Sign up for Replit</a>
Click the button below to sign up for a .NET Fiddle account - you will need an email account in order to sign up. If you already have a .NET Fiddle account, you can login to your account using the below button as well.

<img src="./media/replit-signup.png" height="300" alt="Replit sign up form" />
<a class="my-2 mx-4 btn btn-info" href="https://dotnetfiddle.net/SignUp" target="_blank">Sign up for .NET Fiddle</a>

Next, launch the Replit console we will use today by clicking the below button. You should see the screen below.
<img src="./media/dotnetfiddle-signup.png" height="300" alt=".NET Fiddle sign up form" />

<a class="my-2 mx-4 btn btn-info" href="https://replit.com/@nuevofoundation/NF-GuessTheWordActivity" target="_blank">Launch Replit</a>
{{% /notice %}}

<img src="./media/replit-start-screen.png" height="300" alt="The starting screen of a repl" />
Next, launch the .NET Fiddle console we will use today by clicking the below button. You should see the screen below.

We will now fork the Repl, which simply means to make a copy of the program, so that we can make our own changes to it. Click on the "Fork Repl" button on the top right, and then the "Fork Repl" button.
<a class="my-2 mx-4 btn btn-info" href="https://dotnetfiddle.net/lMl7j4" target="_blank">Launch .Net Fiddle</a>

<img src="./media/replit-fork.png" height="300" alt="Forking a repl to make a copy of the program" />
<img src="./media/guessTheWordActivity-start.png" height="300" alt="The starting screen of a fiddle" />

After forking the Replit, you will see a window similar to the one below:

<img src="./media/replit-window.png" height="300" alt="Replit window" />
{{% notice tip %}}
If you logged in, you could fork the Fiddle, which simply means to make a copy of the program, so that we can make our own changes to it and save it. Click on the "Fork" button on the top.

<img src="./media/dotnetfiddle-fork.png" height="300" alt="Forking a fiddle to make a copy of the program" />

After forking the Fiddle, you will see a window similar to the one below:

<img src="./media/guessTheWordActivity-fork.png" height="300" alt=".Net Fiddle window" />

{{% /notice %}}

We will ignore some of the details on this screen, but we will go over some of the basics that show up. The `main.cs` file contains code, or instructions for the computer to run. By pressing the **run** button, you tell the computer to perform the instructions in the code. Any results from running the code will be displayed on the right side, called the **console**.

Expand Down
4 changes: 2 additions & 2 deletions content/english/csharp-guess-the-word/activity-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ weight: 4

## Instructions

Go to the code containing the [GuessTheWord](https://aka.ms/nuevoguesstheword) game. Press **run**. Notice that `Press 'run' on the top of the screen to play again.` is the only thing that is printed to the console. Let's add a welcome message so that the player knows they playing the Guess the Word game.
Go to the code containing the [GuessTheWord](https://dotnetfiddle.net/lMl7j4) game. Press **run**. Notice that `Press 'run' on the top of the screen to play again.` is the only thing that is printed to the console. Let's add a welcome message so that the player knows they playing the Guess the Word game.

Find `// TODO (ACTIVITY 1)` in the code. Add a line of code to print Welcome to C# GuessTheWord to the console. If you did this correctly, `Welcome to C# GuessTheWord` will be printed to the console after pressing **run**.

![alt text height="600px" width="70%"](../media/replit-activity1.PNG "Replit for activity 1")
![alt text height="600px" width="70%"](../media/guessTheWordActivity-1-start.PNG "Fiddle for activity 1")
2 changes: 1 addition & 1 deletion content/english/csharp-guess-the-word/activity-6.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Now, let's finally address the bug that was introduced in **Activity 4.2**.

The game should continue to ask the player to guess letters if they have some lives remaining, and they have not yet won the game. Look at the `for` loop. As you might have noticed, even though you might have lives remaining, the game abruptly stops after only 3 guesses. We will replace this `for`-loop with a `while`-loop, with the correct looping condition. Use the given hint to complete the activity.

![alt text height="600px" width="70%"](../media/replit-activity6.PNG "Replit for activity 6")
![alt text height="600px" width="70%"](../media/dotnetfiddle-activity6.PNG "Replit for activity 6")
2 changes: 1 addition & 1 deletion content/english/csharp-guess-the-word/boolean-operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ Try guessing the answers to the following expressions. Use `Console.WriteLine` t
- `(9 < 10) && (12 => 11)`
- `(15 - 2 == 11) || (4 % 3 != 2)`

<a class="my-2 mx-4 btn btn-info" href="https://replit.com/@nuevofoundation/NF-CSharp-blank" target="_blank">Launch Replit</a>
<iframe width="100%" height="475" src="https://dotnetfiddle.net/Widget/ULv0JH" frameborder="0"></iframe>

{{% /notice %}}
2 changes: 1 addition & 1 deletion content/english/csharp-guess-the-word/booleans.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ Try guessing the answers to the following expressions. Use `Console.WriteLine` t
- `"Hello" + "World" == "Hello World"`
- `false == false`

<a class="my-2 mx-4 btn btn-info" href="https://replit.com/@nuevofoundation/NF-CSharp-blank" target="_blank">Launch Replit</a>
<iframe width="100%" height="475" src="https://dotnetfiddle.net/Widget/ULv0JH" frameborder="0"></iframe>

{{% /notice %}}
2 changes: 1 addition & 1 deletion content/english/csharp-guess-the-word/comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To remove a comment (or uncomment a line), simply delete the `//` for a single-l
2. Delete the `//` and instead, surround `Console.WriteLine("Hello World");` with `/*` and `*/`. Check that `Hello World` is still not printed to the console after pressing **run**.
3. Delete both `/*` and `*/`, and press **run**. `Hello World` should now be printed to the console.

<a class="my-2 mx-4 btn btn-info" href="https://replit.com/@nuevofoundation/NF-CSharp-WritingToConsole" target="_blank">Launch Replit</a>
<iframe width="100%" height="475" src="https://dotnetfiddle.net/Widget/pdWOTp" frameborder="0"></iframe>

Throughout today's activity you will see various multi-line comments and `// TODO` comments. These comments will guide us towards completing the Guess the Word game, so be sure you understand how to comment and uncomment code.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Afterwards, the console waits for user input.
- If the user enters no, the computer prints out `Oh no, that's too bad!`.
- Otherwise, the computer prints out: `I don't understand you! Goodbye!`.

<a class="my-2 mx-4 btn btn-info" href="https://replit.com/@nuevofoundation/NF-CSharp-blank" target="_blank">Launch Replit</a>
<iframe width="100%" height="475" src="https://dotnetfiddle.net/Widget/ULv0JH" frameborder="0"></iframe>

{{% /notice %}}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/english/csharp-guess-the-word/media/booleans-intro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/english/csharp-guess-the-word/media/if-else.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/english/csharp-guess-the-word/media/if-false.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/english/csharp-guess-the-word/media/if-nested.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/english/csharp-guess-the-word/media/if-three.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/english/csharp-guess-the-word/media/if-true.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/english/csharp-guess-the-word/media/numbers-intro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/english/csharp-guess-the-word/media/strings-intro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/english/csharp-guess-the-word/media/variables-intro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/english/csharp-guess-the-word/media/while-1.png
Binary file modified content/english/csharp-guess-the-word/media/while-2.png
2 changes: 1 addition & 1 deletion content/english/csharp-guess-the-word/numbers.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Try printing out the answers to the following to the console. Ensure your bracke
- `(3 + 5) * 6`
- `(13 + 5 * 8) / (6 - (3 + 7))`

<a class="my-2 mx-4 btn btn-info" href="https://replit.com/@nuevofoundation/NF-CSharp-blank" target="_blank">Launch Replit</a>
<iframe width="100%" height="475" src="https://dotnetfiddle.net/Widget/ULv0JH" frameborder="0"></iframe>

{{% /notice %}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ I don't know the answer to that! Goodbye!

`[input]` should be replaced with whatever the user had typed into the console.

<a class="my-2 mx-4 btn btn-info" href="https://replit.com/@nuevofoundation/NF-CSharp-blank" target="_blank">Launch Replit</a>
<iframe width="100%" height="475" src="https://dotnetfiddle.net/Widget/ULv0JH" frameborder="0"></iframe>

{{% /notice %}}
38 changes: 0 additions & 38 deletions content/english/csharp-guess-the-word/starting-up.md

This file was deleted.

4 changes: 2 additions & 2 deletions content/english/csharp-guess-the-word/strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Console.WriteLine("Apple" + "Pineapple");
Console.WriteLine("Nuevo" + " " + "Foundation");
```

![alt text height="600px" width="70%"](../media/strings-intro.png "Combining strings with +")
![alt text height="600px" width="70%"](../media/strings-intro.PNG "Combining strings with +")

{{% notice tip %}}

Expand All @@ -37,6 +37,6 @@ Nuevo Foundation
Nuevo Foundation
```

<a class="my-2 mx-4 btn btn-info" href="https://replit.com/@nuevofoundation/NF-CSharp-Strings" target="_blank">Launch Replit</a>
<iframe width="100%" height="475" src="https://dotnetfiddle.net/Widget/itRFnP" frameborder="0"></iframe>

{{% /notice %}}
2 changes: 1 addition & 1 deletion content/english/csharp-guess-the-word/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ ComputerComputerComputer
15
```

<a class="my-2 mx-4 btn btn-info" href="https://replit.com/@nuevofoundation/NF-CSharp-blank" target="_blank">Launch Replit</a>
<iframe width="100%" height="475" src="https://dotnetfiddle.net/Widget/ULv0JH" frameborder="0"></iframe>

{{% /notice %}}
4 changes: 2 additions & 2 deletions content/english/csharp-guess-the-word/writing-to-console.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ weight: 1

## Working Together

1. In the Replit program below, press **run**. You see that `Hello World` is printed out to the screen on the right.
1. In the Fiddle program below, press **run**. You see that `Hello World` is printed out to the screen on the right.
2. Without removing the quotation marks, try changing `"Hello World"` to another sentence. Press **run** to see if anything changes.
3. Add another `Console.WriteLine` below the current line to print a second sentence below the first sentence.
4. Press **run** to see if two sentences are printed out. If you see any red text, please ask for help.

<a class="my-2 mx-4 btn btn-info" href="https://replit.com/@nuevofoundation/NF-CSharp-WritingToConsole" target="_blank">Launch Replit</a>
<iframe width="100%" height="475" src="https://dotnetfiddle.net/Widget/pdWOTp" frameborder="0"></iframe>

{{% /notice %}}

Expand Down

0 comments on commit cbb7d74

Please sign in to comment.