In this article we’ll discuss object-oriented programming (OOP) in Python. We’ll discuss classes and objects and we’ll learn how to create a class with its own properties and methods then we’ll see how to create an instance (object) form this class.

For this article, our problem is to create a model for products in an online store to manage them. Let’s see how we can we do that with OOP!

Object-Oriented Programming (OOP)

OOP has dominated the software industry for many years now. From what its name says, it’s about using the idea of an object and a class to structure a software…


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. …


Lists are used to store and manage collections of data. Let’s explore this important topic while solving a little problem.

Photo by Valeriy Kryukov on Unsplash

We’ll learn this topic while solving a little problem, also the problem will cover other previous topics like loops to practice them more.

Our problem for this tutorial is to calculate the average and maximum temperature in a certain week. We have the daily temperature measurements of a week. We also want to output the lowest three temperatures.

In part one of the series we installed Python, in part two we installed VS Code and wrote our first program, in part three we learned about variables and how to read inputs from users of our application, in part four we…


In this article, we’ll see another type of loops: the for loop, a very important structure in Python. We’ll see how and when to use it also we’ll discuss nested loops.

In part one of the series we installed Python, in part two we installed VS Code and wrote our first program, in part three we learned about variables and how to read inputs from users of our application, in part four we discussed if-statements. in part five we learned about while loops.

In the previous article we talked about while loop, we saw how we can use it to repeat a certain part of our code. Another type of loops in Python is the “for-loop”.

For this tutorial we have a small problem to solve, we want to ask our…


In this tutorial, we’ll learn about loops in Python. We’ll see the “While-loop” and how to use it to solve our problem..

In part one of the series we installed Python, in part two we installed VS Code and wrote our first program, in part three we learned about variables and how to read inputs from users of our application and in part four we discussed if-statements.

Photo by Joshua Sortino on Unsplash

For this tutorial, we have a simple problem to solve. We need to calculate the price of items purchased in a certain marketplace or store.

The user of our app keeps entering the price of items purchased and their quantity and when he is done we display the total price of all items.

The input…


In this tutorial, we will learn about the if-statement and how to perform different scenarios in our code based on a certain condition.

We will learn these concepts while solving a small problem.

In part one of the series we installed Python, in part two we installed VS Code and wrote our first program and in part three we learned about variables and how to read inputs from users of our application.

Our problem for this tutorial is about calculating the price of a flight ticket, where the flat price for example is 100$ for everyone except for the children…


In this tutorial, we will read inputs from the users of our app and see how to use variables, data types, casting, expressions in Python. We are going to learn these topics while solving a small problem.

Photo by Markus Spiske on Unsplash

In part one of the series we installed python and in part two we installed VS Code and wrote our first program. For this tutorial, we want to solve this small problem: calculating our weekly payment given the number of hours we worked in a week and the hourly wage. Our little application has the following input-output:

Inputs: number of hours, hourly wage


In this article we’ll install Visual Studio code, write a Python program and run it as an application.

In part one of the series, we installed python and run the interactive mode where we wrote our first code. We used Python interpreter in the interactive mode in the command prompt. Now we are going to use an editor to write our code.

To write Python code and compile it to an application, we need to write it inside a file. An editor can help us in many ways like highlighting the keywords, detecting our syntax errors which are the typing mistakes we make, and a lot of other features that we’ll see later.

From the many existing editors…


Python in Action

In this series, we’ll learn Python programming together from scratch. We’ll start in this article by setting up our environment and writing our first line of code.

Why Python, again?

Python is one of the main programming languages is, it’s widely used nowadays in many fields. it’s an English-like programming language and that’s because the code we write in python is somehow similar to writing normal English.

While you are trying to read the Python code, it is relatively easy to comprehend it up to a certain level of course.

More importantly, python is very famous because of its simplicity and simplicity is…

Sari Lakkis

Professor of Electrical & Computer Engineering | Entrepreneur | Wisdom Seeker.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store