1/16
Vocabulary flashcards covering core Python functions, comparison operators, conversion formulas, and logic rules from COSC 145 quizzes and midterm materials.
sorted()
A built-in Python function that returns a new, sorted copy of an iterable (such as a list or string) without altering the original data structure.
["abracadabra"] vs. "abracadabra"
["abracadabra"] is a Python list containing a single string element of length 1, whereas "abracadabra" is a string literal containing a sequence of 11 characters.
min()
A built-in Python function that evaluates an iterable or multiple arguments and returns the element with the lowest value.
sum()
A built-in Python function that takes an iterable of numeric values and returns their total sum as a single number.
Floor Division (//)
An arithmetic operator that divides two numbers and rounds the result down to the nearest integer, discarding any fractional remainder.
Centimeter to Inch Conversion Factor
The exact metric-to-imperial conversion ratio stating that 1inch=2.54centimeters, meaning centimeters divided by 2.54 yields inches.
Double Equals Sign (==)
The comparison operator in Python used to evaluate whether two expressions or values are equal, distinct from the single equals sign (=, which performs assignment).
Colon (:) in Python Control Flow
A mandatory syntactic character required at the end of header statements such as if, elif, else, for, and while to introduce an indented block of code.
Method
A specialized function that belongs to and is called on a specific object or class using dot notation (e.g., s.title()).
Function
A reusable, standalone block of code that is invoked by its identifier directly and passed arguments to perform a task (e.g., sorted(), min()).
Body Mass Index (BMI) Formula
A metric calculation defined as weight in kilograms divided by height in meters squared: BMI=height2weight.
BMI Optimum Range
A Body Mass Index value between 18.5 and 24.9 inclusive; values below 18.5 are classified as underweight, and values above 24.9 are classified as overweight.
Shortbread Recipe Base Ratio
An ingredient ratio specifying 2.5 cups of flour, 1 cup of butter, and 0.5 cup of sugar per batch of 12 cookies.
Fahrenheit to Celsius Conversion Formula
The temperature conversion relationship defined as ∘C=9/5∘F−32.
Office Comfort Range
An acceptable temperature range defined as between 18∘C and 23∘C; below 18∘C is classified as "Too cold" and above 23∘C is classified as "Too hot".
Demographic Percentage Formula
The proportion of a specific subgroup relative to the total workforce, calculated as percentage=totalsubgroup_count×100.0.
Divisibility Test
A conditional test using the modulo operator to determine whether an integer divides evenly with zero remainder (e.g., n % 5 == 0 for divisibility by 5).