Go course

VariablesHello, Gopher!

Go

Display

Theme

Variables · Output exercise

Hello, Gopher!

Welcome to the Go course! Go (often called Golang) is a programming language created at Google, designed to be simple, fast to compile, and easy to use for concurrent programs.

Every Go program you can run has two things:

  1. package main — tells Go this package builds a program (not a library).
  2. func main() — the point where the program starts running.
package main

import "fmt"

func main() {
	fmt.Println("hello")
}

fmt.Println prints text and then adds a line break (a newline) at the end.

Task

Change the program in the editor so it prints the following two lines, exactly as shown:

Halo, Gopher!
Saya siap belajar Go.

(That's "Hello, Gopher!" and "I'm ready to learn Go." — keep the text exactly as written.)

Click Run to try it, then Submit to check your answer.

main.go
package main

import "fmt"

func main() {
	fmt.Println("hello")
}

Output

Go runtime not loaded yet

Press Run to see the output, or Submit to check your code.

Ctrl/Cmd + Enter: Run · Ctrl/Cmd + Shift + Enter: Submit · Ctrl/Cmd + S: tidy the code (gofmt)