Challenge 1 — Solution Task: Write a function divide(a, b float64) (float64, error) that returns an error from the errors package if b is 0, otherwise the division result and nil. Call it twice — once with b = 0, once with a real divisor — handling both with if err != nil. package main import ( "errors" "fmt" ) func divide(a, b float64) (float64, error) { if b == 0 { return 0, errors.New("cannot divide by zero") } return a / b, nil } func main() { result, err := divide(10, 0) if err != nil { fmt.Println("Error:", err) } else { fmt.Println("Result:", result) } result, err = divide(10, 2) if err != nil { fmt.Println("Error:", err) } else { fmt.Println("Result:", result) } } Expected output: Error: cannot divide by zero Result: 5 Notes: - The second call reuses result and err with = instead of := since both variables already exist from the first call. - errors.New("...") creates a real error value; printing it with fmt.Println shows just the message text. - divide(10, 2) returns nil as its error, so the if err != nil check correctly falls through to printing the result instead.