1/10
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
What are Data Types?
Data type specifies the size and type of variable values.
Go is statically typed:
Variable type defined can only store data of that type.
Go has three basic data types:
bool: represents a boolean value and is either true or false.
Numeric: represents integer types, floating point values, and complex types.
string: represents a string value.
Fill the blanks in the snippet:
var a **** = true
var b *** = 5
var c ******* = 3.14
var d ****** = "Hi!"
bool
int
float32
string
Fill the blanks: A ******* data type is declared with the **** keyword and can only take the values **** or *****.
boolean, bool, true, false
The default value of a boolean data type is *****.
false
Signed integers, declared with one of the int keywords, can store?:
both positive and negative values.
Go has five keywords/types of signed integers:
int
int8
int16
int32
int64
Unsigned integers, declared with one of the uint keywords?:
Can only store non-negative values.
The float data types are used to store?:
Positive and negative numbers with a decimal point.
The string data type is used to store?:
A sequence of characters (text). String values must be surrounded by double quotes.