Posts

Showing posts from April, 2023

Featured Post

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

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