An answer of the exercise: Loops and Functions on a tour of go