# Category Archives: Go (en)

## Golang: Newton’s algorithm

Task number 8 in golang tour… Cycles and functions To play with functions and loops, let’s implement the square root function: Given a number x, we want to find the number z for which z² is closest to x. Computers … Continue reading

## Golang. The average of the numbers entered in the string

Let’s write a program that reads N numbers separated by a space (in one line) and calculates their average value. The task seems to be simple, but it can be solved in different ways. Here is my version:

## Golang. Median

Today let’s remember what the median is and how to find it. The median is a number exactly in the middle of an ordered list. It is a very useful thing in statistics and it helps to see the real … Continue reading

## Golang. Number of letters in a sentence

Calculate the number of characters in the text – how many which letter occurs how many times. You can do this with maps, but there is another, C-style way: character arithmetic:

## Golang. Funny basic example of `if/else`

There is a resource for newcomers to the Go language – “A Tour of Go“. There’s a funny example in the beginning by number 7..

## Golang. Simple programs for beginners

The Go language is very similar to C. Here are some simple programs. Let’s begin… Calculate 2 to the 12th power.