This introductory Chapter will get you started with your first programs in Python. It will introduce the two must common types of numbers (integer, and floating-point), operations with numbers, strings, and variables.

Objectives

Upon completion of this chapter’s exercises, you should be able to:

  • Use the print statement to display one or more values.
  • Explain the difference between floating-point and integer values.
  • Set up mathematical expressions in Python.
  • Produce output using string literals.
  • Create variables and assign the results of an expression to them.
  • Use variables in expressions and display the values of variables.