Set 1 Flashcards
Understanding from Variables to Classes (37 cards)
Interpreter
Tool to read and execute our Python code
Variable
A named container to store some data that we can reference later in our code
String
Python data type that consists of characters, denoted by single or double quotation marks
“I am a string”
‘me too’
Integer
Python data type that consists of positive or negative whole numbers
Float
Python data type that consists of positive or negative decimal numbers
Boolean
Python data type that consists of True or False
Modulus
Python operator that returns the remainder from a division problem between two numbers.
5 % 3 = 2
Concatenation
Combining two strings into one single string via the + operator
String Interpolation
F-String used to plug in python code directly into strings. Also called formatted string literals
List
Python data type that stores any type of Python data in a particular order. First item inside resides at the position (index) of 0.
Mutable
Changeable
Immutable
Not-Changable
Tuple
Ordered collection that is immutable. Syntax is (1, 2)
Conditional
A statement that resolves to either True or False
For Loop
A loop that is used to iterate over a series of items
While Loop
A loop that runs until a statement resolves to True
Dictionary
Python data type that stores values referenced by keys (Key-Value store). This collection is un-ordered
Function
A block of code that can be referenced by a name, making a procedure re-usable.
Scope
Block of code where variables that are assigned here can only reach. Global variables can be accessed in the global scope (everywhere), local variables can only be accessed in the local scope.
Parameters
Variable names assigned to the data that is passed in to the function. How we can access the data given to a function when called.
Arguments
The data that has been given to a function for a parameter to hold.
Return
Terminating a function by sending data outside of the function. Every function has a default return of None if no other return has been called.
Code Block
Region of scoped code that we can define variables and functions to be executed. Denoted by a tab (or more)
Procedure
A step by step process that is used to perform some sort of task. Usually inside of a function