Data and Variables Flashcards
What is this called?
- All the text, numbers, and other information that are
processed by a computer - Stored in variables in memory
Data items
What are the 3 different forms of data items?
- Variables
- Literals, or unnamed constants
- Named constants
Working with Variables
___________ are known as:
- Named memory locations
- Contents can vary or differ over time, holds just one value, can be used repeatedly with different values
Variables
Working with Variables
____________ is a statement that provides a data type and an
identifier for a variable. It is an act of introducing a variable to the complier
Declaration
Working with Variables
____________ is known as:
- Variable’s name
- names given to a variable
Identifier
Working with Variables
This is the classification that describes:
- What values can be held by the item
- How the item is stored in computer memory
- What operations can be performed on the data
item
Data type
Working with Variables
What data type represents whole numbers (e.g. -4, 0, 10)
Integer
Working with Variables
What data type represents fraction or decimal numbers? (e.g. 76.6, 0.001, 95.5)
Float
Working with Variables
What data type represents a character (e.g. Hello World)
String
Working with Variables
What data type represents logical true or false? (e.g. true, false)
Boolean
Working with Variables
What data type represents no data? (e.g. null)
Nothing
Working with Variables
This is the process of _____________ a variable:
- Declare a starting value for any variable
- an act of assigning a value to a variable
Initializing a variable
TRUE OR FALSE
The following code is initializing a variable:
string yourName = “Anna”
Working with Variables
TRUE
TRUE OR FALSE
The following code is initializing a variable:
num mySalary
Working with Variables
FALSE
Working with Variables
What term is used for the following?
- Variable’s unknown value before initialization
- Assign a value later
- Receiving one as input
- Placing the result of a calculation.
Garbage