ABSTRACT

Numbers are some of the simplest and most familiar objects on which wecan compute. Numbers are also quite versatile; they can represent quantities, measurements, identifiers, and are a means of ordering items. In this chapter, we will introduce some of the fundamentals of carrying out computations with numbers in the Python programming language, and point out the ways in which numbers in a computer sometimes behave differently from numbers in mathematics. In later chapters, we will build on these ideas to design algorithms that solve more sophisticated problems requiring objects like text, lists, tables, and networks.