Complete the code to declare a constant named Pi with the value 3.14.
const Pi [1] 3.14
In Go, constants are declared using the const keyword followed by the name, then an equals sign =, and the value.
Complete the code to declare multiple constants Pi and E with values 3.14 and 2.71.
const (
Pi [1] 3.14
E [1] 2.71
)When declaring multiple constants in a block, each constant uses an equals sign = to assign its value.
Fix the error in the constant declaration to assign the value 100 to MaxScore.
const MaxScore [1] 100
Constants must be assigned with =. The short declaration := is only for variables.
Fill both blanks to declare constants Width and Height with values 1920 and 1080.
const Width [1] 1920 const Height [2] 1080
Each constant declaration uses = to assign its value.
Fill all three blanks to declare constants Name, Age, and Active with values "Alice", 30, and true.
const Name [1] "Alice" const Age [2] 30 const Active [3] true
Each constant declaration uses = to assign its value, regardless of type.