Welcome to LTC!
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 2024 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 getting set up with Python.
Each folder contains some notes on what we did during the session, exercises, and their solutions.
Session | Week | Date | Notes (online) | Notes (PDF) |
---|---|---|---|---|
Session 0: Installing Python | Notes | |||
Session 1: Syntax and Variables | 2 | 26/10 | Notes | |
Session 2: If statements, For loops | 3 | 2/11 | Notes | |
Session 3: While loops, Try | 4 | 9/11 | Notes | |
Session 4: Lists | 5 | 16/11 | Notes | |
Session 5: Functions | 6 | 23/11 | Notes | |
Session 6: Turtle Graphics | 7 | 30/11 | Work in progress | Work in progress |
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.
- Here is a tutorial for building a number guessing game in Python. (Difficulty: 2/5)
- Here is a tutorial for building a snake game in Python using PyGame. (Difficulty: 4/5)
- Here is a tutorial for basic machine learning in Python. (with thanks to previous committee members in 2020) (Difficulty: 4/5)
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.