Pythonbeginner
Python Fundamentals
Learn to program from zero with Python: variables, decisions, loops, functions and files, ending with small programs you build yourself.
- Lessons
- 16 lessons in 4 modules
- Study time
- about 8 hours
- Duration
- ~4 weeks at your own pace
Free plan: counts as one of your 2 new courses this month. Plans
What you'll learn
- Write and run Python programs that take input and make decisions
- Use lists, dictionaries and loops to work with real data
- Organise code into functions and read and write files
- Build three small projects, from a quiz game to an expense tracker
Syllabus
Module 1Getting startedSet up Python and write your first programs.3 lessons
- What programming is and why PythonExplain what a program is and run your first Python line.20 min
- Variables, numbers and textStore values in variables and work with numbers and strings.30 min
- Input, output and string formattingWrite programs that ask questions and print neat answers with f-strings.30 min
Module 2Making decisions and repeatingControl the flow of a program.4 lessons
- Booleans and if/elif/elseMake a program choose between actions using conditions.30 min
- while loopsRepeat work until a condition changes, and avoid infinite loops.30 min
- for loops and rangeLoop over numbers and sequences to automate repetitive tasks.30 min
- Project: number guessing gameCombine input, conditions and loops into a complete game.40 min
Module 3Working with collectionsLists, tuples, dictionaries and sets.4 lessons
- Lists and list operationsCreate, change, slice and sort lists.30 min
- DictionariesStore and look up data by key, and loop over keys and values.30 min
- Tuples, sets and choosing a collectionPick the right collection type for a task.30 min
- Project: quiz game with a question bankBuild a quiz that stores questions in a list of dictionaries.40 min
Module 4Functions, files and errorsWrite reusable code and work with files.5 lessons
- Defining functionsWrite functions with parameters and return values.30 min
- Reading and writing filesSave program data to a text or CSV file and load it back.30 min
- Handling errors with try/exceptCatch common errors so programs fail gracefully.30 min
- Modules and the standard libraryImport and use modules such as random, math and datetime.30 min
- Project: personal expense trackerBuild a menu-driven app that saves expenses to a file.45 min