1/17
Vocabulary flashcards covering conditional branching, syntax rules, functions, variables, data types, type casting, and Python scripts from Lecture 5 of ENGI-1020.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Proposition
Whatever evaluates to True or False (a Boolean value) in Python.
Branching
A compound statement in Python that stretches across more than one line of code to direct program flow.
Header
The top line of a compound statement containing a keyword (such as if), a condition, and a colon (:).
Body
The indented statements positioned under a header that are executed sequentially IF the condition evaluates to True.
Nested Conditionals
IF statements placed inside other IF statements, requiring indentation to make complex, multi-tiered decisions.
Maximum Safe Deceleration
4.5m/s2; the maximum deceleration threshold safe for an average driver to maintain control.
Syntax
Strict and unambiguous rules to follow in programming; failure to follow proper programming syntax prevents a program from running.
Function
A block of code which only runs when it is called.
Parameters
Data passed into a function, written in a comma-separated list inside parentheses following the function name.
Variable
A name assigned to a location in computer memory where information is held. Variables themselves do not have types; values do.
bool
A Python data type used for Boolean (True/False) values.
int
A Python data type used for integer (whole number) values.
float
A Python data type used for real numbers (numbers containing a decimal).
str
A Python data type used for names and arbitrary-length text.
type()
A built-in Python function that returns the data type of a value or the current value stored in a variable.
Type Conversion (Casting)
The process of converting values from one data type to another using built-in functions such as int(), float(), str(), or bool().
Comments
Helpful descriptive text intended for people rather than the computer; denoted by # to the end of the line, or enclosed between triple single or double quotes.
Python Script
A sequence of Python statements and comments saved in plain-text format.