Chapter 2 - Data, Expressions, Variables and I/O Flashcards
Atomic Data
Smallest unit of data a computer program can define
Compound Data
Data that can be subdivided into smaller pieces, which can be organized
Eg. a list
Bits
0’s and 1’s that make up binary code
Data Type
Tells a computer how to interpret binary bits
Integer Data
Positive or negative whole numbers, or zero
Atomic data type
Floating-Point Data
Real numbers
Atomic data type
Boolean Data
True / False
*Capitalization matters!
Atomic data type
String Data
Sequences of characters and are usually used to store text
Compound data type
List Data
Sequences of data items
Each item can be of any data type
Compound data type
Dictionary Data
Key-value pairs in no particular order
Compound data type
Expressions
Combinations of data and operators
Operators
Write expressions that compute new values from existing data
Value of the Expression
Result of the expression
Literal
Number or string written into a program
Integer Literal
Any number written without a decimal point