Version 2: Corrected example in Question 1.
Version 2: clarified wording of Questions 3 and 4; added extra test case to Question 4.
Sample Quiz 1.
Sample Quiz 2.
Sample Final Exam (updated with minor corrections to wording).
Links to some good (and free) e-books on Python.
This is a textbook for an introductory computer science course that uses Python. It's a good reference if you need introductory information on programming in general.
A nice interactive textbook based on an earlier version of the Think Python book. Runs Python code in your browser.
An introduction to Python with several chapters describing how to automate computer-based tasks involving different types of documents (spreadsheets, PDF files), software (browsers, word processors) and network protocols (web, e-mail).
Interactive, Python-based Computer Science textbook covering the traditional first-year CS curriculum. Too detailed for this course but might be useful as a reference for specific algorithms or data structures.
This is a well-reviewed book but has a steep learning curve. It's useful if you need more in-depth information on a particular topic.
A good brief tutorial on Python.
We'll be using Python 3 (version 3.10 or later) and the Jupyter Notebook interface in the lectures and labs.
miniconda is an installer for Python and many "data science" packages. It's available free for Windows, Mac and Linux. Installation requires about 300 MB and a few minutes. After installing miniconda you'll need to install Jupyter notebook: in the Anaconda command-line prompt window type the command: conda install jupyter notebook
Anaconda is a collection of software that includes Python, Jupyter Notebook and many, many other "data science" packages. It will take up about 3GB of disk space and a while (15? minutes) to install. Avoid the upsell nonsense on the site; everything we're using is open-source software.