Go: final assessment

This covers the whole course. Take it after the last module.

Final quiz

1. What does fmt.Println do?
2. Which of these declarations is only allowed inside a function?
3. What is the value of var n int before anything is assigned?
4. What is 7 % 2?
5. Which type holds text?
6. How many times does the body of for i := 0; i < 3; i++ run?
7. What does reading a missing key from a map[string]int give?
8. How do you print a map in a fixed order?
9. What is a Go string?
10. Which function splits a text on any run of spaces?
11. Which receiver lets a method change the struct it is called on?
12. What can a variable of an interface type hold?
13. What does errors.Is(err, ErrX) check?
14. What does a send on an unbuffered channel do?
15. Why is a sync.Mutex used?
16. On this site int has 32 bits. Which type is best for a sum that may pass 2 billion?

Practical assessment: A library loans program

Without using hints, write a Go program that manages a small library from commands read on the input, in the style of the last lesson.

Final project

A command-line task manager: Build a program that keeps a list of tasks and obeys commands from the input: add a task, mark it finished, list the tasks, show counts and remove one. Every mistake in a command is reported clearly and the program carries on.

How it is evaluated

To complete this course