This is a tutorial in the form of Jupyter notebooks that allows you to modify and run the examples. We'll be following this tutorial in the lectures. To use it, unpack the zip file to a folder where your notebooks are kept (typically under your user or home directory). This is CC0 licensed. From: https://github.com/jakevdp/WhirlwindTourOfPython
The text is available as Jupyter Notebooks on GitHub. The publisher now only makes a one-page HTML version available. But the Internet Archive has the PDF version.
This is the Python tutorial that is part of the "official" Python documentation from python.org. It is also installed locally when you install Python (if the installation included the documentation).
Version 3: corrected argument names in Question 3 description. Corrected checking code for Question 2.
Version 2: Question 3 allows text argument in the raise statement
Version 2: Corrected marking code for Question 3.
Version 3: Added requirement in Question 4 that the sort be "stable" (order preserving)
Version 4: Fixed example for Question 3.
This is a sample version of Quiz 1. The actual Quiz 1 for your set will be similar.
These are some solutions for the sample version of Quiz 1.
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.
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.