Learn Programming Basics
Your first steps in code, from zero. Eighteen lessons start with what a program is and a first script. Then come variables, types, lists and operators. After that, the program learns to choose with if and to repeat with loops. Then it is split into functions. The last lessons cover errors, debugging and the habits of clean code. Every example is in Python, because it reads close to plain English. It stops at the basics. How the main languages differ is a separate subject.
Not started
0 of 18 lessons done
Level 1 · What a program is
score0200/19 wordsWhat a program is, the text it is written in, and a first script. How lines of code are put together.
- Programs and Source CodeWhat a program is, and what source code is. How input goes in and output comes out, and what a software developer does all day.10 min6 terms
- Hello World in PythonYour first Python script, the Hello World program. Why you plan in pseudocode first, and why syntax has to be exactly right.10 min4 terms
- Statements and ExpressionsThe two kinds of piece every line of code is made of. What a keyword is, why comments matter, and how to try a line out first.10 min5 terms
- Code Blocks and IndentationHow Python groups lines into blocks with spaces at the start. What a module is, and how files make up the codebase of a project.10 min4 terms
Level 2 · Values and variables
score20450/23 wordsHow a program keeps a value under a name. The kinds of value, groups of values, and the signs that work on them.
- Variables and AssignmentHow a variable keeps a value under a name, and how the = sign puts it there. When a constant is better, and why hard-coding hurts.11 min4 terms
- Data Types in PythonThe kinds of value a program works with: whole numbers, decimals, text, true or false, and None. Why 0.1 + 0.2 is not quite 0.3.12 min7 terms
- Type Conversion and StringsHow to turn text into a number and back. How to join strings, and how an enum gives a value a short list of allowed names.11 min3 terms
- Lists, Dictionaries and SetsHow a program keeps many values under one name. Lists and their index numbers, key and value pairs, sets with no repeats, and tuples.13 min5 terms
- Operators in PythonThe signs that do maths, compare two values, and join true or false answers. Why == is not =, and what and, or and not do.12 min4 terms
Level 3 · Decisions and loops
score45600/8 wordsHow a program picks which lines to run, and how it runs the same lines again and again.
- If, Else and MatchHow a program makes choices with if, elif and else. How control flow skips lines, and how match checks one value against many cases.12 min3 terms
- For and While LoopsHow a loop runs the same lines again and again. For loops over a list, while loops on a test, break to stop, and the loop that never ends.13 min5 terms
Level 4 · Functions
score60750/11 wordsHow to name a block of code and reuse it. What goes in, what comes out, where names can be seen, and a function that calls itself.
- Functions in PythonHow to write a function with def, call it, give it arguments and get a return value back. The built-in functions Python already has.13 min6 terms
- Scope and Passing ArgumentsWhere a name can be seen in a program, and why names inside a function stay local. What changes outside when a function changes its argument.13 min3 terms
- Recursion in PythonWhat recursion is: a function that calls itself on a smaller job. Why it needs a base case to stop, and the limit of 1,000 calls.12 min2 terms
Level 5 · Errors and debugging
score75880/9 wordsThe three kinds of error. How to read the report Python prints, and how to find the line that went wrong.
- Bugs and Error TypesWhat a bug is, and the three kinds of error: syntax, runtime and logic. Why the off-by-one error is the most common bug of all.12 min6 terms
- Exceptions and DebuggingWhat an exception is, and how to catch one with try and except. How to read a stack trace from the bottom, and how to hunt down a bug.14 min3 terms
Level 6 · Good code habits
score881000/8 wordsThe rules of thumb that keep code easy to read and change, and the team habits that go with them.
- Clean Code and NamingWhat clean code is, and why the names you choose matter most. Naming conventions, style guides, and writing code in pairs.11 min4 terms
- DRY, KISS and YAGNIThree short rules of thumb for writing code: do not repeat yourself, keep it simple, and do not build what you do not need yet. Plus SOLID.11 min4 terms
Words in this course
The 78 glossary entries this course teaches, in the order it teaches them. Open any of them on its own.
- Program
- Software
- Source Code
- Input and Output
- Software Developer
- Software Development Life Cycle (SDLC)
- Hello World Program
- Script (Programming)
- Pseudocode
- Syntax
- Statement
- Expression
- Keyword
- Comment
- Read-Eval-Print Loop (REPL)
- Code Block
- Indentation
- Module (Programming)
- Codebase
- Variable
- Assignment
- Constant
- Hard-Coding
- Data Type
- Integer
- Floating-Point Number
- String
- Boolean
- Null
- Byte
- Type Conversion
- String Concatenation
- Enumeration (Enum)
- Array
- Index
- Dictionary
- Set
- Tuple
- Operator
- Arithmetic Operator
- Comparison Operator
- Logical Operator
- Control Flow
- Conditional Statement
- Switch Statement
- Loop
- For Loop
- While Loop
- Infinite Loop
- Break Statement
- Function
- Function Call
- Parameter
- Argument
- Return Value
- Built-in Function
- Scope
- Pass by Value
- Pass by Reference
- Recursion
- Base Case
- Bug
- Error
- Syntax Error
- Runtime Error
- Logic Error
- Off-by-One Error
- Exception
- Stack Trace
- Debugging
- Clean Code
- Naming Convention
- Code Style Guide
- Pair Programming
- Don't Repeat Yourself (DRY)
- KISS Principle
- You Aren't Gonna Need It (YAGNI)
- SOLID Principles