Introduction

Published

2023-07-31

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

Original author: Clayton Cafiero < [given name] DOT [surname] AT uvm DOT edu >

No generative AI was used in producing this material. This was written the old-fashioned way.

This material is for free use under either the GNU Free Documentation License or the Creative Commons Attribution-ShareAlike 3.0 United States License (take your pick).