Posts

Showing posts from April, 2023

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

Working with files in Python

Image
WORKING WITH FILES IN PYTHON INTRODUCTION In this Python tutorial, you will learn how to work with files, that is, how to read and write files using python programming. Consider the code in source file as shown below. I have used the repl.it code editor to code. Python is a very powerful language and as you will learn in the following passages, how it is possible to open, read, write and make changes to created other files using our python script in the main.py file. For the purpose of this lesson, we will be using several in-built python functions such as open(), read(), write() and append() functions while explaining the two examples provided below to demonstrate how python handles files. The code editor that I have used for this purpose is the most popular cloud editor Replit  and you can easily find it from the source code that I have included at the end of this post. Code Example 1 my_file = open("index.html","w") my_file.write("<p> HELLO WORLD, th...

Build A Calculator in React

Image
  Build A Calculator in React This project is part of the freeCodeCamp react certification program. In this React Project tutorial, we will learn how to build a simple calculator using JavaScript React framework.  TASKS TO ACHIEVE IN THE PROJECT The calculator should contain clickable element with an  'Equal to'  sign (that is, an = symbol )  which has an id of "equals". There should be ten clickable elements having one number each from 0-9 with the following corresponding IDs :  id="zero", id="one", id= "two", id="three", id="four", id="five", id="six", id="seven, id="eight" and id="nine" There will be four clickable elements each having one of the primary mathematical operators with the following corresponding IDs:  id="add', id="subtract", id="multiply", id="divide". T here will be one clickable element with a decimal point  symbol w...