go Assignments

Assignments Assignment means "copying" values. Everything is getting copied in Go. You'll learn more about this afterward. Now, get your feet wet and try some assignment exercises. Make It Blue Variab
阅读全文

go 03-unused-variables

What happens when you don't use a declared variable in the block scope? Nothing, it will work fine It will get removed automatically The program won't compile CORRECT What happens when you don't use a
阅读全文

go 04-zero-values

Which type's zero value is 0? bool pointer string all numeric types CORRECT Which type's zero value is false? bool CORRECT pointer string all numeric types Which type's zero value is ""? bool pointer
阅读全文

go QUESTIONS: What's a variable?

QUESTIONS: What's a variable? Where does a variable live? Hard Disk Computer Memory - CORRECT CPU What do you use a variable's name for? To be able to access it later - CORRECT It's just a label I don
阅读全文

go 02-declaration

Which statement do you need to use for declaring variables? name int vars string name var name integer var width int CORRECT Which sentence below is correct? You can use a variable before declaring it
阅读全文

go Declare and Print Variables

Declare and Print Variables Warm up. Declare a few variables and get some experience. Get used to the variable declaration syntax. Declare int Declare bool Declare float64 Declare string Declare undec
阅读全文

go questions

Which one below is an integer literal? -42 CORRECT This is an integer literal "Hello" This is a string literal false This is a bool constant 3.14 This is a float literal Which one below is a float lit
阅读全文

go exercises

Print the literals Print a few values using the literals Print hexes (optional exercise) Print numbers in hexadecimal
阅读全文

go questions

Which is a correct declaration? var int safe := 3 var safe bool := 3 safe := true CORRECT Which is a correct declaration? var short := true int num := 1 speed := 50 CORRECT num int := 2 Which is a cor
阅读全文