Below you will see the code of a Go program. Please select in what code blocks/statements the local variable food can be accessed:
package main
import "fmt"
func main() {
for {
var food string
fmt.Println("Hello! please enter an emoji of any food type:")
fmt.Scanln(&food)
if food == "🍏" {
fmt.Println(food, "belongs to the FRUIT group!")
break
} else if food == "🥦" {
fmt.Println(food, "belongs to the VEGETABLE group!")
break
} else if food == "🍖" {
fmt.Println(food, "belongs to the MEAT group!")
break
} else {
fmt.Println(food, "is not food!")
break
}
}
}