Posts

Showing posts from 2025

Featured Post

Learn Python by Coding a Simple To-Do List in Python from Scratch

Image
Introduction This simple project in Python will not only teach you to build a simple ToDo List, but also assist you to learn basic Python concepts along the way! The basic concepts that you will be learning are about using the indefinite loop, that is, while True, how to stop the loop, if-elif-else loops, and also about creating a functional to do list in which the user is able to not only add items, but also, view items, update or edit them, remove items and also delete the entire list itself.  Please note this is Part 4 of my Python series. If you missed the algorithms and planning stages, check out Parts 1, 2, and 3 on my Substack! What We Want Our To do List to do Defining the Problem : Creating a storage space for storing the to do list grocery items that I want to shop. I want to make the list with a menu that shows a menu of choice with features such as Add, View, Edit, Remove, Delete and Exit options. So, I need a way to add items, view them, edit them, remove any of the it...

Beginner's Guide On For Loop in Python

Image
  Beginner's Guide On For Loop in Python Introduction This post is for beginners who are trying to learn Python and they will find this step-by-step guide very easy to understand.  Here, I will be first introducing the concept of the 'for' loop in Python, and thereafter, I will proceed to explain the significance and methods of using this loop in your Python projects with several easy-to-understand examples and source code.   What is a 'for' loop A 'for' loop in Python is used to loop over a sequence and it is very useful when you perform tasks in your python functions. The 'for' loop could be used for looping or iterating over a list, tuple, set, dictionary or a string. We will see the examples below. During the phase of looping through a list for example, after creating the variable name to specify each item in the list, we will decide what is the action that is to be executed in the phase of this iteration whereby each and every item s...

How To Use While Loops In Python

Image
How To Use While Loops In Python Overview  This beginners Python guide will explain the steps for working with 'while' loops in Python for beginners. Introduction  The Python while loops help to execute a set of statements in Python functions,  as long as a particular specified condition is True. Let us understand the while loop with a simple python example exercise, of a while loop usage, where we are trying to count numbers from 1 to 10, with a condition of the number being less than 10. We create a variable called num, and initiate it with a initial value of 1 and we carry out iteration of this num variable, whereby, it is incrementing every time it loops, by incrementing by 1.  Code num = 1 while num < 10 :       print(num)       num += 1 # output   1 2 3 4 5 6 7   8  9 In the above case, we performed iteration of the while loop where every time the loop iterates, the num variable gets incremented by 1 a...

Essentials About Python Return Statement

Image
Essentials About Python Return Statement                                                                          photo credit:Rubaitul Azad,  Unsplash  Introduction This post will guide you step-by-step on Python return statement with indepth details and examples to give you a very clear picture on the concept of return statement in Python as well as the usage of the return statement. Using return statements needs a good understanding of the definition of the return statement that we will be learning soon in the following passages. Also, we will see as we start doing python projects, that, the skill in using the return statement, that is, when to use the return statement, how to use the return statement.     What Is A Return Statement The keyword return is a Python in-built keywo...

How To Use Python Arithmetic Operators

Image
How To Use Python Arithmetic Operators Introduction Arithmetic Operators are used in Python to carry out mathematical operations on numerical values. It is very important to understand this operator well in order to complete Python projects that require you to do carry out mathematical calculations. In this guide, you will come across all the different types of arithmetic operators that will be explained in an easy-to-understanad manner. Types of Python Arithmetic Operators There are six types of arithmetic operators in Python and in this guide, I will be explaining every one of them with detailed explanation as well as with simple example exercises, for your easy understanding! So, keep reading this post until the very end , so that you do not miss out any valid points. The 6 types of arithmetic operators are :  1. Addition Operator  2. Subtraction Operator   3. Multiplication Operator  4. Division Operator 5. Modulus Operator  6. Exponential Operator Addi...