# Values

This section demonstrates basic string concatenation, arithmetic operations, and boolean logic. Let's break it down step by step:

```go
// Package declaration - Every Go program starts with a package declaration.
package main

// Importing the "fmt" package - It provides functions for formatting and printing.
import "fmt"

// The main function - It is the entry point of the program.
func main() {
	// Print the concatenated string "go" + "lang"
	fmt.Println("go" + "lang")

	// Print the result of the arithmetic operation 1+1
	fmt.Println("1+1 =", 1+1)

	// Print the result of the arithmetic operation 7.0/3.0
	fmt.Println("7.0/3.0 =", 7.0/3.0)

	// Print the result of the boolean operation true && false (logical AND)
	fmt.Println(true && false)

	// Print the result of the boolean operation true || false (logical OR)
	fmt.Println(true || false)

	// Print the result of the boolean operation !true (logical NOT)
	fmt.Println(!true)
}
```

### Output

```
golang
1+1 = 2
7.0/3.0 = 2.3333333333333335
false
true
false
```

Now, let's go through each part:

1. **Package Declaration:**

   ```go
   package main
   ```

   * In Go, every program starts with a package declaration. The `main` package is a special package that serves as the entry point for the executable programs.
2. **Import Statement:**

   ```go
   import "fmt"
   ```

   * This line imports the "fmt" package, which provides functions for formatting and printing text.
3. **Main Function:**

   ```go
   func main() {
   ```

   * The `main` function is the entry point of the program. Execution of the program begins here.
4. **String Concatenation:**

   ```go
   fmt.Println("go" + "lang")
   ```

   * This line prints the concatenated string "go" + "lang" using the `Println` function from the "fmt" package.
5. **Arithmetic Operations:**

   ```go
   fmt.Println("1+1 =", 1+1)
   fmt.Println("7.0/3.0 =", 7.0/3.0)
   ```

   * These lines print the results of simple arithmetic operations. The first line prints the sum of 1 and 1, and the second line prints the result of dividing 7.0 by 3.0.
6. **Boolean Logic:**

   ```go
   fmt.Println(true && false)
   fmt.Println(true || false)
   fmt.Println(!true)
   ```

   * These lines demonstrate boolean logic. The first line prints the result of the logical AND operation between `true` and `false`. The second line prints the result of the logical OR operation. The third line prints the result of the logical NOT operation on `true`.
7. **Closing Brace:**

   ```go
   }
   ```

   * The closing brace marks the end of the `main` function.

This Go program thus introduces string concatenation, arithmetic operations, and boolean logic using the basic features of the language. It's a simple and concise example to get started with Go programming.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ineelhere.gitbook.io/code-with-go/2-values.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
