Python Part 8 — Functions in Python — Solving Large Problems by Decomposition

Sari Lakkis
Jun 1 · 7 min read

In this tutorial we will explore functions in Python and how to use them to solve a large problem by decomposing it into smaller ones that can be solved alone.

Functions makes programming easier and the code more organized and easier to write and understand.

For our tutorial, we have a small problem to solve, we have a list that contains the number of passengers in cars.

We want to determine the total number of passengers in a group of cars. We have…