Behind every mouse click and touch-screen tap, there is a computer program that makes things happen. This course introduces the fundamental building blocks of programming and teaches you how to write fun and useful programs using the Python language.
This module gives an overview of the course, the editor we will use to write programs, and an introduction to fundamental concepts in Python including variables, mathematical expressions, and functions.
- Pyhon and Computer Memory
- Python as a Calculator
- Variables
- Visualizing Assignment Statements
- Built-in Functions
- Defining Functions
This module introduces strings (a Python data type used to represent text), and a process to follow when creating a function.
- Type str: Strings in Python
- Input/Output and str Formatting
- Docstrings and Function help
- Function Design Recipe
- Function Reuse
- Visualizing Function Calls
This module introduces Booleans (logical values True and False), how to convert between types, how to use Boolean expressions in if statements to selectively run code, and the concept of a Python module.
- Functions, Variables, and the Call Stack
- Type bool: Booleans in Python
- Converting between int, str, and float
- Import: Using Non-Builtin Functions
- The if statement
- No if Required
- Structuring if Statements
This module introduces one way to repeat code (using a for loop), how to manipulate strings, and how to use a debugger to watch a program execute step by step.
- More str Operators
- str: indexing and slicing
- str Methods: Functions Inside Objects
- for loop over str
- IDLE's Debugger
This module introduces another way to repeat code (using a while loop), how to properly document your code to help other programmers understand it, Python's list data type, and the concept of mutation.
This module introduces how to use a for loop over the indexes of a list, how to nest lists, and how to read a write files.
- for loops over indices
- Parallel Lists and Strings
- Nested Lists
- Nested Loops
- Reading Files
- Writing Files
This module introduces tuples (an immutable version of lists), and Python's dictionary type.