Welcome to Programming Foundations in Python, a 10-topic course in the basics of coding with the popular programming language Python.
Each topic has a YouTube playlist with 6-10 short videos (roughly an hour long) accompanied by a zip file of downloadable standalone examples. The examples all use Python but I give comparisons with other popular languages (such as C, Java and JavaScript) along the way.
Obviously you can dip in and out of the videos, using the lists of contents below as an index, but if you want to take the whole course, I recommend watching one topic a week (or one a day if you are in a hurry) and then practising with the examples to build your skills up.
Please feel free to leave comments on the videos (questions or constructive criticism) and I will reply to you as soon as I get the chance. I also recommend subscribing to my YouTube channel for addition courses that I will be releasing.
Video 01-1 - What is programming: Objectives. Python textbooks. What is computer programming? What is a computer program? What is a programming language? What is syntax? Programming problems.
Video 01-2 - What is Python: What is Python? Installing Python. What is the Python shell?
Video 01-3 - Using the Python shell: First example. Hello world! Calculator. Syntax errors. Saving your work.
Video 01-4 - First Python program & examples: Python examples (downloadable). HelloWorld.py. Running Python code in IDLE. More examples - text analysis, file management, pizzas GUI.
Video 01-5 - Turtle - getting started: Turtle graphics. Yin-Yang example. Modifying the code. Variables & hard-coding.
Video 01-6 - Turtle - simple shapes: Turtle principles. Drawing a square. Comments. Importing Turtle. Pen up / down. More commands.
Video 03-1 - Introduction & motivation: Objectives. Motivation.
Video 03-2 - Conditionals: if statement: Conditionals: the if statement. Using if statements. Example 1 - Calculator (if). Flow of control. Conditional flow of control.
Video 03-3 - Conditionals: else statement: Conditionals: the else statement. Using else statements. Defensive programming.
Video 03-4 - Conditionals: elif statement, combined, indentation: Conditionals: the elif statement. Example 3 - Calculator (if+elif). Example 4 - Calculator (if+elif+elif). Defensive programming (2). Conditionals combined. Example 5 Calculator (if+elif+else). Indentation.
Video 03-5 - Concessions & booleans: Concessions. Example 6 - Concessions. The "+=" operator. Booleans. Example 7 - Concessions (booleans).
Video 03-6 - Concessions: in operator, or operator: Example 8 - Concessions (in operator). Comparison operators. Example 9 - Concessions (elif). Examples 10 & 11 - Concessions (or operator).
Video 03-7 - Concessions: nested ifs, and operator, not operator: Example 12 - Concessions (nested ifs). Example 13 - Concessions (and operator). Example 14 - Concessions (or operators). Example 15 - Concessions (booleans). The not operator. Example 16 - Concessions (not operator).
Video 03-8 - Choices, validation & summary: Choices, choices. Validation. Example 17 - Random Values (validation). Summary.
Video 04-1 - Introduction & motivation: Objectives. Motivation. Writing functions. Motivating Example - Turtle squares.
Video 04-2 - Calculator output example: Example 2 - Calculator. Declaring functions. Example 3 - Calculator output().
Video 04-3 - General principles: Flow of control. File structure. Execution. Quick check 1.
Video 04-4 - Arguments & Parameters: Arguments. Parameters. Example 4 - Calculator - generic output().
Video 04-5 - Calculator input examples: Example 5 - input() functions. Invoking a function which returns a value. output() vs input(). Duplication. Example 6 - input_int().
Video 04-6 - More Calculator examples: Example 7 - calculate(). Quick check 2. Quick check 3. Using a function as a parameter. Example 8 - Calculator input_and_convert().
Video 04-7 - Common problems: Problems with functions. Syntax functions. Example 9 - parameter naming. Scope. Example 10 - scope bug. Example 11 - parameters bug. Example 12 - arguments bug. Example 13 - arguments bug.
Video 04-8 - Defaults & summary: Defaults. Example 14 - defaults. Example 15 - return bug. Summary.
Video 06-1 - Introduction & motivation: Objectives. Motivation. Loop types.
Video 06-2 - The while loop: Syntax. Example 1 - stars. Output string. The += operator.
Video 06-3 - The for loop: Syntax. Example 2 - stars. The range() function. Example 3 - print counter.
Video 06-4 - for vs while: Examples 4 & 5 - user input. for vs while. Which to use?
Video 06-5 - The range() function & loop counters: range() continued. Example 6 - print counters. Loop counters - starting from 0 or 1. Quick check.
Video 06-6 - More loops: More loops. Example 7 - random values. Pseudo-code. Example 8 - concessions loop.
Video 06-7 - Controls: break & continue: Other loop controls. Example 9 - line numbers. The break statement. Example 10 - break. The continue statement. Example 11 - continue.
Video 06-8 - Nesting: Nested loops. Example 12 - fixed rectangle. Example 13 - square. Example 14 - variable rectangle.
Video 06-9 - Variable limits: Variable loop limits. Example 15 - triangle. Summary.
Video 07-1 - Introduction & motivation: Objectives. Motivation.
Video 07-2 - List basics & initialisation: List notation. Accessing lists. Initialising a list. Example 1 (first list).
Video 07-3 - Loops & lists: Using loops & lists. Problems. The len() function. Example 2 (using len()). A better approach (enhanced for loop). Example 3 (using in). Quick check.
Video 07-4 - Functions & methods: The print_list() function. Example 4. List methods. Example 5 (list methods). List item methods. Example 6 (list item methods).
Video 07-5 - Numbers & lists: Lists of numbers. Example 7 (sorted randoms). Unique values. Example 8 (sorted unique randoms).
Video 07-6 - Sets: Sets. Using sets. Example 9 (set of randoms).
Video 07-7 - Built-in functions: Built-in functions (max, min, sum). Example 10 (built-in functions). Functions vs methods.
Video 07-8 - Indexing & slices: List indexing. Slicing. Slicing defaults. Slicing examples.
Video 07-9 - List algorithms: List function implementations. Minimum. Sum. Example 12 (local implementations). Summary.
Video 09-1 - Introduction & opening: Objectives. Motivation.
Video 09-2 - Reading: File handling. Reading a file. Working with the file system. The with keyword. The read() function.
Video 09-3 - Spell checker & exceptions: Spell checker example. Exceptions. Exception handling. try ... except.
Video 09-4 - The file system & file lister: Accessing the file system. Using the os (operating system) module. Recursion. Example - file lister. Recursion and exceptions.
Video 09-5 - More examples: count, search, update, delete: Example - line count. Example - file search. Example - CRUD (create, read, update, delete) functionality.
Video 09-6 - Processing CSV files & web pages: Processing CSV files. Processing web pages. Example - basic browser. Example - letter frequency. Summary.