Python for Teens glossary
27 terms you will meet in the free Python for Teens course, each explained in one or two sentences.
B
- Boolean (bool)
- A value that is either True or False.
- Bug
- A mistake in a program that makes it crash or behave wrongly.
C
- Comment
- A note in code that starts with # and is ignored when the program runs.
- Condition
- An expression that is True or False, used by if statements and while loops.
D
- Data type
- The kind of value something is, such as int, float, str or bool. It decides what you can do with the value.
F
- f-string
- A string with an f before the quotes that fills in {expressions} with their values.
- Float
- A number with a decimal point, such as 3.5 or 2.0.
- Floor division (//)
- Division that rounds down to a whole number: 17 // 5 is 3.
- Function
- A named, reusable block of code defined with def that can take inputs and return a result.
I
- Indentation
- Spaces at the start of a line. In Python it shows which lines belong to a block.
- Index
- The position of an item in a list or string, starting at 0.
- Infinite loop
- A loop whose condition never becomes False, so it never stops on its own.
- Integer (int)
- A whole number with no decimal point, such as 7, 0 or -12.
L
- List
- An ordered, changeable collection of values in square brackets, such as [3, 7, 9].
- Loop
- Code that repeats: a for loop goes through a sequence; a while loop repeats while a condition is True.
M
- Module
- A file of ready-made Python code you can import, such as random or math.
- Modulo (%)
- The remainder after division: 17 % 5 is 2.
O
- Operator
- A symbol that performs an operation, such as +, //, % or ==.
P
- Parameter
- A variable in a function definition that receives a value when the function is called.
- Program
- A list of instructions a computer follows, written in a programming language.
R
- range()
- A function that produces a sequence of whole numbers, such as range(1, 5) giving 1, 2, 3, 4.
- Return value
- The result a function sends back to the code that called it, using return.
S
- String (str)
- Text inside quotes, such as "hello" or '42'.
- Syntax
- The spelling and grammar rules of a programming language. Breaking them causes a SyntaxError.
T
- Traceback
- The error report Python prints when a program crashes, ending with the error type and message.
- Type conversion
- Turning a value into another type with int(), float() or str().
V
- Variable
- A name that refers to a value stored in memory, created with = (for example, score = 0).
Put these terms to work
The Python for Teens course uses every one of these terms in short lessons with instant-feedback questions. It takes about 115 minutes and ends with a free certificate of completion.
Start the course Course overview