Python Fundamentals: Learn to Program in Python
Python Fundamentals is a beginner-level course of 5 lessons (about 2 h 30 min), with 15 exercises and 15 quiz questions. Prerequisites: Programming Basics and Algorithms. Exercises run in the browser, with nothing to install.
- Python
- Beginner
- 5 lessons
- 2 h 30 min
- 15 exercises
- Exercises run in the browser
The course in brief
This course has you write your first Python programs, right in the browser. You work with the basic types, make decisions with conditions, process series of values with loops and data structures, then organize your code into robust functions. It is the common foundation of the Python data and web development paths.
What you will be able to do
- Work with variables, basic types and type conversions
- Write conditions and loops to automate simple processing
- Choose and use lists, tuples, dictionaries and sets
- Write documented functions with parameters and a return value
- Handle predictable errors with try / except
- Produce readable output with f-strings
Syllabus: 5 lessons
- Create variables and assign values to them
- Recognize the int, float, str and bool types with type()
- Convert a value from one type to another and display it with an f-string
- 02
Conditions: if, elif, else
- Write comparisons that return a boolean
- Structure a decision with if, elif and else
- Combine several conditions with and, or and not
- 03
Lists and Loops
- Create a list, access its elements and modify it
- Iterate over a list with a for loop and range()
- Use while, break and simple list comprehensions
- 04
Dictionaries, Tuples and Sets
- Store and retrieve information with a dictionary
- Iterate over a dictionary and count occurrences
- Choose between list, tuple, dictionary and set
- 05
Functions and Error Handling
- Define a function with parameters and a return value
- Use default parameters and document a function
- Catch a predictable error with try / except
Final project
Mini Order Manager
Write a Python program that analyzes a list of orders from a small online shop. The data is provided as a list of dictionaries (customer, product, quantity, unit price as text with a comma, optional promo code). The program must convert the data robustly, compute the total of each order with discount, aggregate revenue by customer and by product, then display a small readable report.
Deliverables
- A Python script containing at least three documented functions (price conversion, order total calculation, aggregation by key)
- Handling of invalid values with try / except, with the number of ignored rows
- A report displayed with f-strings: total revenue, average basket, best customer, best-selling product
- A few assertions that check the result of each function on simple cases
Assessment criteria
- The program runs without errors, including with invalid data
- The calculations (totals, discounts, aggregations) are correct
- The data structures are well chosen (lists, dictionaries, sets)
- Functions have explicit names, clear parameters and return their results with return
- The output is readable and amounts are formatted with two decimal places
Frequently asked questions
Do I need to know how to program to take this Python course?
No. The course starts from zero; it only assumes you are comfortable with a computer and the notions covered in the F1 introductory course. Each concept is explained with commented examples and then practiced.
Do I need to install Python on my computer?
No, all the exercises run directly in the browser. You can install Python later for your own projects, but it is not necessary to follow the course.
Which version of Python is used?
The course teaches Python 3.15, the latest stable version; the exercises run in the browser with Python 3.14. The concepts presented are stable and valid for all currently maintained versions of Python 3.
How long does it take to learn the basics of Python?
The course represents about three hours of work, final project included. By practicing the exercises regularly, most learners master these basics in one to two weeks.
How does this course help me become a data analyst or developer?
Variables, loops, data structures and functions are used everywhere: data analysis with pandas, automation, web development with Django or FastAPI. This course is the prerequisite for the following Python modules.
This course, told for your job
Say what you want to be able to do: “Python Fundamentals” takes its place in your path, with examples from your field. The concepts stay those of the course.