Python Programming Fundamentals
A skill that helps in any field: from the logic of programming to writing your own functions.
- 40 lessons
- 20 topics
- 259 coding exercises
- 400 questions
What you'll learn
- Turn a problem into an algorithm you can solve step by step
- Read Python code and predict what it will do
- Build simple programs with variables, conditions, and loops
- Store data in lists and dictionaries
- Write your own functions
- Recognize and fix common mistakes
Topics and lessons
1.First programs
- Introduction to programming
- Variables
- Numbers and math
- Strings, types, and conversion
- Error messages and getting help
2.Make decisions
- Conditions
3.Repeat
- Algorithms and loops
4.Functions and reliable code
- Functions
- Errors, debugging, and tests
5.Text processing
- Strings
6.Data structures
- Lists
- Dictionaries
- Tuples and sets
- Comprehensions
- Functions as values
7.Files and libraries
- Catching errors
- Files
- Modules and the standard library
- Regular expressions
Case study
The Corner Café
Every lesson follows one story: you write the order program for The Corner Café from scratch. You start by putting prices in variables, move the menu into lists and dictionaries, calculate the bill, read orders from a file, and produce the day's report.
Tools: Python 3 · runs in your browser, no install
How a lesson works
Explanation
A short explanation with examples. You change the code on the page and run it right away.
Coding exercises
Fill in the blanks, write it yourself, fix the bug. You get separate feedback for each requirement.
Lesson quiz
10 questions. Get at least 7 right to unlock the next lesson; every option has an explanation.
Review
Your mistakes go into the review queue and come back just as you start to forget them.
Sample question
Python, lists
What does this code print?
numbers = [3, 1, 2]
result = numbers.sort()
print(result)Every question in the lessons works like this
- After you answer, you read why each option is right or wrong.
- No memorization: you read the code or the data and work out the result yourself.
- Questions you miss go into your review queue and come back just as you start to forget them.
Projects you can build with this course
Apply what you learned on a real case from start to finish. Projects go step by step, and your code is saved.
Python · project
Café bill calculator
Price a table's order from the menu, apply a tiered discount, print an aligned receipt and split the bill between people.
Beginner · 6 stepsPython · project
Hangman
Mask the secret word, track letter guesses with a set, count the lives left, and finish by writing a small bot that plays by letter frequency.
Intermediate · 6 stepsPython · project
Text adventure game
Build the rooms with a dictionary, process commands, manage the inventory; code the locked door and dark cellar rules and check them with assert tests.
Advanced · 6 steps
- Prerequisites
- None.
- Who it's for
- Students and new graduates starting programming from zero, whatever your major.
About this course
Do I need any background?
No. The course is designed for people who have never programmed.
Where do I start?
Lesson 1 has you print your first program. Then variables, conditions, loops, functions, lists, and dictionaries follow in order. All 40 lessons are open.
Is it free?
Yes. All lessons, coding exercises, quizzes, and projects are free. You only need a free account.
Do I need to install anything?
No. The code runs in your browser and never leaves your computer. The first time you run code, the engine takes a few seconds to download.
How does a lesson work?
A short explanation, coding exercises, and a 10-question quiz. Get at least 7 right to unlock the next lesson. Questions you miss go into a review queue and come back when it is time.
Can I study on my phone?
You can read lessons and do quizzes and reviews comfortably on a phone. A computer is easier for writing code.
Study this course
Read the first lesson without an account. Sign up free to solve the exercises and the quiz and to save your progress.