/learntocode

Individual session resources for each Learn to Code session

Primary LanguageJupyter NotebookGNU General Public License v3.0GPL-3.0

Learn to Code

Each year Oxford University CompSoc runs an introductory programming course in Python. This repositories contains all of the notes and code samples used in the 2023 course.

To run these code samples you will need Python 3. For the sessions we recommend using IDLE, a piece of software which comes pre-installed with Python. Alternatively you can run the samples in a terminal via:

python3 filename.py

See the Notes for Session 0 for instructions on setting this up.

If you can't get Python installed on your computer, we recommend using this online environment instead.

Each folder contains some notes on what we did during the session, exercises, and their solutions.

Table of Contents

Session Week Date Notes (online) Notes (PDF) Slides
Session 0: Installing Python N/A N/A Notes PDF N/A
Session 1: Introduction: What can you do with Python? Python syntax, variables, if statements 1 14/10 Notes PDF Slides
Session 2: If statements, For loops 3 28/10 Notes PDF N/A
Session 3: While loops, Lists 5 11/11 Notes PDF N/A
Session 4: Lists, Functions 7 25/11 Notes PDF N/A

Next steps

Now that you have learnt the basics of Python, there are quite a lot you can do with it. You can go ahead to make your own application and unleash your creativity. However, if you are not too sure what to do yet, here are a few extra materials that might help you get started. Note that there is no order in which you have to do these, feel free to choose the one you like the most.

  1. Here is a tutorial for building a number guessing game in Python. (Difficulty: 2/5)
  1. Here is a tutorial for building a snake game in Python using PyGame. (Difficulty: 4/5)
  1. Here is a tutorial for basic machine learning in Python. (with thanks to previous committee members in 2020) (Difficulty: 4/5)

Running your own Learn to Code

You are more than welcome to use these materials to run your own version of Learn to Code! We would ask that you adhere to the spirit of Learn to Code, meaning in particular that any course run is as free and as open as possible. In particular, please note that these materials are offered under the GPL license. This means that if you use these materials as any part of your own course then you must freely publish all the materials for that course under the same GPL license.

Please refer to COPYING for more details on the license.