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:
- At least 3 variables — one per field, with the right types (
stringfor text,intfor a number,boolfor yes/no). - At least one
const(e.g. the app's name). - One
fmt.Printfline using%s/%d/%vthat shows the whole record nicely. go run main.goworks 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
mainjust calls it. Your variables stay; only the thing that prints them changes.