From the course: C# and .NET Essential Training
Tour of CoderPad - C# Tutorial
From the course: C# and .NET Essential Training
Tour of CoderPad
- [Instructor] This course includes automated code challenges that appear when you click on the challenge links in the course's table of contents. Each challenge includes instructions and a couple of code editors you can use to create and test your own solution to the challenge. These challenges are hosted by CoderPad and they appear in the same area of the course page where you watch the course's videos. We recommend using a desktop browser for the best experience with code challenges, but you can use the LinkedIn Learning mobile app if you prefer. The code challenge has four areas. In the top left, you will find the instructions for completing the challenge, a code editor for you to create your answer in the top right, another code editor where you can see how your code is being used in the bottom right and a console for output in the bottom left. You can use these drag handles to allocate screen space as you like, and you can see that I can resize each of these quadrants as I like. And to get even more horizontal space for your code editors, you can collapse the course's table of contents on the left. Each challenge has instructions that include a description of the challenge and the challenge's parameters and desired result. Depending on the challenge, you will see some additional information in the instructions, such as an explanation of the parameters that your code will be given, along with some examples of what the expected output might look like, and you might even see a little hint down here in the lower left. You will create your answer in the top right code editor. There are comments in the starting code showing you where to put your solution, and then you will click on test my code, you'll see a message indicating whether your code returned a successful result. So I'm going to go ahead and demo the existing state of this editor with the obvious wrong answer in there and when I click on test my code, you can see that it runs my code. And over here in the console output, we can see that, oh, well that's not the expected result. My code returned zero. So obviously that's wrong. The show expected result and show hints variables determine whether you see the expected result and any hints. So we can change them to a value of true to control the output. I'm going to change each of these to true, because I need some extra help. Alright, so then I'll click on test my code again. Alright, and now we can see that I got the error message, because again, my answer's wrong. It shows what my code returned, but now you can also see down here in the lower left that the expected result is being shown to me and there's a little hint that tells me where I should look further if I want to create the right answer. So regardless of whether your answer is successful, you will see messages in the console output to the lower left. Alright, so let's go ahead and change this code to put in the right answer. Alright, and I've got to use system link for this. Okay, when I do that, yeah, that error message goes away. And you can see down here that the code, this is the test code, this shows me how my solution is being tested. So let's go ahead and just click on things now that I've changed the code to the right answer, when I click on test my code. Alright, you can see that now I'm getting the right answer. And in this particular challenge, not all challenges will do this, but in this particular challenge, I can actually edit the sample code to see if my code is working correctly. So I'll make the proper answer 25. I'll change that one to one. I'll make that one a six. Alright, so now when I run this again, the largest number should be 25. And sure enough, we can see that that's now correct. If any messages are too long to fit into the console area, you can scroll sideways to see all of the text. Now, when you finished each code challenge, return to the course's table of contents and click the next video to see my solution so you can compare it with your own.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.