From the course: Learning C#

CoderPad Challenges - C# Tutorial

From the course: Learning C#

CoderPad Challenges

- [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: there's the instructions in the top left, a code editor for your answer in the top right, another code editor where you can see how your code is used in the bottom right, and a console for output in the bottom left. You can use these drag handles to allocate space as you like and to get even more horizontal space for the 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. And 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 there might even be a hint or two. Create your answer in the top right code editor. And there are comments in the starting code showing you where to put your solution. So you can see it says right here, "Your code goes here." When you click on "Test my code" you'll see a message indicating whether your code returned a correct result. So in this case, I know that the right way of finding the largest number in an array is to use the numbers.Max function. So I'll click on "Test my code." And sure enough, if I scroll up here in the Console output you can see that I got the right answer. Now, if your code isn't successful, you can ask for help. Let's comment this back out again and let's return the wrong answer and you can see that there's the wrong answer. What I can do is change these values to true to get the expected output and a hint. So if I run this again, you can see that that's not correct. It says, hey look, here's the expected result. And a hint, you know, "Have you tried "using the Max method?" Right? The code editor in the lower right shows you how your solution is used. You can change that code to experiment with different test cases. So let's go ahead and put the right answer back in and I'm going to change the 19 to 25. Click on "Test my code" and sure enough you can see that I got the right answer again. Regardless of whether your answer is successful, you'll see messages in the Console output in the lower left. If any messages are too long to fit in that area, you can always scroll sideways to see all the text. When you finished each code challenge, return to the course's table of contents and then click the next video to see my solution.

Contents