Introduction

Published

2023-07-31

Our objective for this chapter is to lay the foundations for the rest of the course. If you’ve done any programming before, some of this may seem familiar, but read carefully nonetheless. If you haven’t done any programming before that’s OK.

Learning objectives

  • You will learn how to interact with the Python interpreter using the Python shell.
  • You will learn the difference between interactive mode (in the shell) and script mode (writing, saving, and running programs).
  • You will learn a little about computers, how they are structured, and that they use binary code.
  • You will understand why we wish to write code in something other than just zeros and ones, and you’ll learn a little about how Python translates high-level code (written by you, the programmer) into binary instructions that a computer can execute.
  • You will write, save, and run your first Python program—an ordered collection of statements and expressions.

Terms introduced

  • binary code
  • bytecode
  • compilation vs interpretation
  • compiler
  • console
  • integrated development environment (IDE)
  • interactive mode
  • low-level vs high-level programming language
  • Python interpreter / shell
  • read-evaluate-print loop (REPL)
  • semantics
  • script mode
  • syntax
  • terminal

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).