Chapter 3 Flashcards
Comment
A line of code written in English preceded by #
print(“”) or print(‘’)
Prints whatever character input between the parenthesis
Line
Programs are made up of lines of code.
Keywords
Words with special meaning.
Data Types
Python groups data into different categories.
Object
Each data value. ie. 2 or “Hello, world!”
3 Properties of an Object
- Identity
- Data Type
- Value
Object’s Identity
Location in your computer’s memory, which never changes.
Object’s Data Type
Category of data the object belongs to, which determines the properties of the object, which never changes.
Object’s Value
The data it represents ie. the number 2. Value of 2.
“Hello, world!” Object Properties
- Data Type: str == string
- Value: “Hello, world!”
aka a string
string
A sequence of one or more characters surrounded by quotes.
character
A single symbol. ie. ‘a’ or ‘1’.
Integer
int;
represents whole numbers
int Properties
Able to multiply(*), divide(/), add(+), subtract(-).