Learn the Basics of Programming and Algorithms
Programming Basics and Algorithms is a beginner-level course of 5 lessons (about 2 h 25 min), with 15 exercises and 15 quiz questions. No prerequisites. Exercises run in the browser, with nothing to install.
- Foundations
- Beginner
- 5 lessons
- 2 h 25 min
- 15 exercises
- Exercises run in the browser
The course in brief
This introductory course lays the foundations shared by every development and data career. You learn to work with variables, make decisions, repeat actions and organize your code into functions. You finish by solving problems with a real algorithmic approach, tested with assertions.
What you will be able to do
- Write a simple Python program using variables, types and operations
- Express decision rules with if, elif, else and logical operators
- Process series of data with lists and for and while loops
- Organize your code into reusable functions with parameters and return
- Break a problem down into pseudocode and implement classic algorithms
- Check your code with assertions and edge cases
Syllabus: 5 lessons
- Understand what a program and an instruction are
- Create variables and choose the right type (integer, decimal, text, boolean)
- Perform calculations and display a result with print and f-strings
- 02
Conditions and boolean logic
- Write comparisons that produce a boolean
- Build branches with if, elif and else
- Combine conditions with and, or and not
- 03
Lists and loops
- Store several values in a list and access them by index
- Repeat instructions with for and while
- Use the counter and accumulator patterns
- 04
Functions: break down and reuse
- Define a function with parameters and a return value
- Tell return and print apart
- Break a problem down into small, testable functions
- 05
Thinking algorithmically: from problem to program
- Break a problem down into steps with pseudocode
- Implement classic algorithms: maximum, search, filtering, counting
- Verify an algorithm by hand and on edge cases
Final project
Expense statement analyzer
Write a small Python program that analyzes a list of expenses created in the code, each expense being a (category, amount) pair. The program must compute the total, the average, the maximum expense, the total per category and flag expenses above a threshold, all organized into tested functions.
Deliverables
- A Python script containing the sample data (at least 10 expenses, 3 categories)
- The functions total, moyenne, depense_max, total_par_categorie and depenses_au_dessus(seuil)
- At least 2 assertions per function, including an edge case (empty list)
- A readable final summary printed with f-strings
Assessment criteria
- The results are correct, including on edge cases
- Each function does one thing and uses return
- The algorithms (maximum, counting, filtering) are written by hand, without max or Counter
- Variable and function names are explicit
- The code is commented where useful
Frequently asked questions
Do I need math skills to take this course?
No. The four basic operations and a bit of logic are enough. Concepts are introduced with concrete examples from everyday life and the working world.
Why learn algorithms with Python?
Python has a readable syntax that lets you focus on the logic. The concepts you learn (variables, conditions, loops, functions) then carry over to JavaScript, PHP, Java or SQL.
Do I need to install anything?
No, exercises run directly in the browser and are graded automatically.
How long does the course take?
About an hour and a half of lessons and exercises, plus the final project. You can go at your own pace, lesson by lesson.
This course, told for your job
Say what you want to be able to do: “Programming Basics and Algorithms” takes its place in your path, with examples from your field. The concepts stay those of the course.