From the course: Learning Go

Explore new code challenges on CoderPad - Go Tutorial

From the course: Learning Go

Explore new code challenges on CoderPad

- [Instructor] This course has been updated with a new style of code challenges running in an environment known as Coder Pad. The Coder Pad environment gives you instructions in the top left. The instructions tell you the values that will be passed into your code and the expected return value. There are also descriptions of what are known as constraints and some examples of how the code should work. In the top right corner, you'll see a code editor and that's where you can add your code. This challenge, for example, asks you to find the largest number in an array of integers. And I'm going to start by adding an import statement to use goes sort package, and then I'm going to replace this return statement and I'm going to sort the numbers using the INTS function and then I'll return the last value in the sorted collection. I'll test my code, and I'll see that I got the answer right and I'll see the value that was returned. If you get the answer wrong, and I'll emulate that by once again returning a value of zero, you'll get a message back indicating that the answer wasn't quite right, but then you can change these values. Show expected result, set to true, will result in showing you what the answer should have been. And I'll show that down here. And if I change show hints to true, I'll get a hint. You can also change the values that are passed into your code in the test code section. I'll change the largest number to a value of 200, and this time I see expected result 200. As you're working in the Coder Pad environment you can resize each of these panes so you can allocate space as you like. For example, I like dragging this all the way over to the left so I can get a much wider and a much taller code editor. So that's the Coder Pad environment, and as you work through the code challenges, you can test your own skills as you learn new features of the Go programming language.

Contents