Introduction
This chapter will expand our understanding of programming by introducing types and literals. We’ll also learn about two additional arithmetic operators: floor division using the //
operator (also called Euclidean division or integer division), and the modulo operator %
(also called the remainder operator). Please note that the modulo operator has nothing to do with calculating percentages—this is a common confusion for beginners.
Learning objectives
- You will learn how to use the assignment operator and how to create and name variables.
- You will learn how to use the addition, subtraction, multiplication, division, and exponentiation operators.
- You will learn the difference between and use cases of division and Euclidian division (integer division).
- You will learn how to use the remainder or “modulo” operator.
- You will learn operator precedence in Python.
Terms introduced
- absolute value
- assignment
- congruence
- dividend
- divisor
- Euclidean division
- evaluation
- exception
- expression
- floor function
- modulus
- names
- operator
- quotient
- remainder
- statement
- variable
Copyright © 2023–2025 Clayton Cafiero
No generative AI was used in producing this material. This was written the old-fashioned way.