Homework

Homework — your item as variables

Now — YOUR app. Take the 3 fields you submitted in lesson 1 and turn them into variables, then print one tidy line.

For example, if your theme is an expense list:

name := "Lunch"
amount := 12
paid := true

fmt.Printf("Expense: %s | amount: %d € | paid: %v\n", name, amount, paid)

Requirements:

  1. At least 3 variables — one per field, with the right types (string for text, int for a number, bool for yes/no).
  2. At least one const (e.g. the app's name).
  3. One fmt.Printf line using %s / %d / %v that shows the whole record nicely.
  4. go run main.go works without errors.

To submit: send the printed line (the one your program output) and the code file.

Tip. Next lesson we stop repeating this printing — we wrap it in a function and main just calls it. Your variables stay; only the thing that prints them changes.