Complete the code to print "Hello, World!" in Go.
package main import "fmt" func main() { fmt.[1]("Hello, World!") }
The fmt.Println function prints the text followed by a new line.
Complete the code to declare the main package in Go.
[1] main
func main() {
// program starts here
}The package keyword declares the package name at the top of a Go file.
Fix the error in the function declaration to make it valid Go code.
func [1]() { fmt.Println("Hello") }
The main function must be named exactly main without parentheses in the declaration.
Fill both blanks to import the fmt package and print a message.
package main import [1]"fmt"[2] func main() { fmt.Println("Welcome to Go!") }
Use parentheses to import packages in a block: import ("fmt").
Fill all three blanks to create a map of string keys to int values with one entry.
package main
func main() {
scores := map[[1]][2]{
"Alice": [3],
}
}The map keys are strings, values are integers, and the value assigned is 100.
