Python flash cards: Novice level
52 Python terms at the Novice level, as flash cards.
Updated
Terms in this deck
- Arithmetic Operators
- The math symbols: + - * / // % **.
- Assignment
- Storing a value in a variable with a single =.
- Augmented Assignment
- A shortcut like += that updates a variable using its current value.
- Axis Label
- The words along a chart's axis that say what it measures and its unit, such as Recycled (tons).
- Bar Chart
- A chart that draws each amount as a bar whose height is the amount, so groups can be compared at a glance.
- Built-in Function
- A function that comes with Python, like print() and len(). No import needed.
- Comment
- A note for people reading the code, starting with #. Python ignores it.
- Comparison Operators
- Symbols like == and < that compare two values and answer True or False.
- Constant
- A value that should never change, named in ALL CAPS so everyone leaves it alone.
- Data Type
- What kind of value something is: whole number, decimal, text or True/False.
- elif
- "Else if": checks another condition when the ones above it were false.
- else
- Runs when none of the if or elif conditions above it were true.
- Escape Character
- A backslash that gives the next character a special meaning, like \n for a new line.
- Exponent
- The ** operator: raises a number to a power.
- Floor Division
- Dividing with // and dropping anything after the decimal point.
- f-string
- Text with values dropped straight in: f"Hi {name}".
- Grand Total
- The total of everything, across every group, which each group's share is divided by.
- if Statement
- Runs a block of code only when a condition is true.
- Indentation
- The spaces at the start of a line. Python uses them to group code into blocks.
- input()
- Waits for the user to type something and gives it back as a string.
- Interpreter
- The program that reads your Python code and runs it, line by line.
- len()
- Tells you how many items something has.
- Line Chart
- A chart that joins measurements taken in order, usually one per day or month, with a line, so the reader sees how a value changed over time.
- Logical Operators
- and, or and not: they combine True/False checks.
- Mean
- The average: add the values up and divide by how many there are; one very large value can pull it far.
- Median
- The middle value when the values are sorted, so one very large or small value can't pull it far.
- Missing Value
- A cell with no value in it: left blank, or typed as a word such as unknown that means nobody knew. pandas shows it as NaN.
- Modulo
- The % operator: the remainder left over after dividing.
- NameError
- The error Python stops with when it meets a name it doesn't know, often a typo such as prnt for print.
- Newline
- The invisible character that ends a line of text, written \n.
- None
- Python's way of saying "nothing here yet".
- Notebook
- A file of cells, code cells and Markdown cells, that keeps each cell's result saved under it; saved as an .ipynb file.
- Notebook Cell
- One block of a notebook, run on its own: a code cell holds Python and shows its result under it, a Markdown cell holds notes.
- Pie Chart
- A circle cut into slices, one per part of a whole; hard to read, because people compare angles poorly.
- print()
- Shows text or values on the screen.
- Python
- A popular, beginner-friendly programming language that reads almost like plain English.
- Python Install Manager
- python.org's tool for installing Python on Windows: it gives the py and python commands, and py install adds a version.
- Raw Data
- Data exactly as it was collected, before any cleaning; it's kept as it is, never written over, so the cleaning can be checked and run again.
- REPL
- Python's interactive prompt: type a line, press Enter, see the result right away.
- round()
- Rounds a number, to a whole number or a set number of decimal places.
- Running Total
- A number you keep adding to as you go through the rows, such as a store's sales so far; a dictionary can keep one for each group.
- Script
- A .py file of Python code you run from top to bottom to get a job done.
- snake_case
- Python naming style: all lowercase with underscores between words.
- String
- Text inside quotes, like "hello" or 'coffee'.
- String Concatenation
- Joining strings end to end with +.
- SyntaxError
- The error Python gives when it can't read the code at all, such as a missing quote or colon, so no line of the file runs.
- Traceback
- The error report Python prints when something goes wrong. Read it from the bottom up.
- Truthy and Falsy
- In an if, empty or zero values count as False (falsy); most others count as True (truthy).
- Type Conversion
- Turning a value into another type with int(), float() or str().
- type()
- Tells you the data type of a value.
- Variable
- A name that holds a value, like a labelled box.
- Whitespace
- Spaces, tabs and new lines. In Python, leading spaces decide which block a line is in.