Go exercises with solutions
45 practice problems from the 15 lessons of the Go Programming course, in lesson order and from easy to hard inside each lesson. Open a problem, write your code and press Submit: the tests run in your browser and nothing is sent to a server.
15 easy problems 15 medium problems 15 hard problems
Your first Go program
3 problems · Read the lesson
Variables, types and constants
3 problems · Read the lesson
Reading input
3 problems · Read the lesson
Conditions and switch
3 problems · Read the lesson
Loops with for
3 problems · Read the lesson
Functions and multiple return values
3 problems · Read the lesson
Arrays and slices
3 problems · Read the lesson
Maps
3 problems · Read the lesson
Strings, runes and the strings package
3 problems · Read the lesson
Structs
3 problems · Read the lesson
Methods and pointers
3 problems · Read the lesson
Interfaces
3 problems · Read the lesson
Errors, panic and recover
3 problems · Read the lesson
Goroutines and channels
3 problems · Read the lesson
Putting it together: a command-line program
3 problems · Read the lesson