Posts

Showing posts from January, 2023

Featured Post

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

Create a Dropdown Menu in HTML & CSS

Image
Create a Dropdown Menu in HTML & CSS This tutorial will teach you how to build a simple dropdown menu in HTML and CSS for your website. Building a simple navigation menu by using HTML and CSS will be an awesome practice for you to learn the basics of HTML and CSS and I will guide you on the basics of the code syntaxes used in this tutorial while building this menu. Why & When to use a dropdown Menu  In this navigation menu, we will be creating the menu for a fashion website, where we will have links to go to the Home page, and also links to take you to Bag, Shoe and Makeup pages. The idea of a menu in any website is for the user to navigate to different pages of the website or blog by clicking on the different tab links. So, we have the tabs for Home, Bag, Shoe and Makeup.  When there are several categories of products and each product having more than one sub-category, then, we need the feel to create a drop-down menu, whereby we can make the navigation much more simp...

A Simple Guide to Promises in JavaScript ES6

Image
A Simple Guide to Promises in JavaScript ES6 In this JavaScript tutorial, based on the freeCodeCamp JavaScript Algorithms and database structures, I will be explaining and walking you through the concept and usage of Promises in JavaScript, with very simple examples to make you understand the concept easily.  What is a Promise in JavaScript? A Promise in JavaScript is an object that displays the final success or failure of an Asynchronous operation.    A Promise in JavaScript is similar to a promise given in real life, meaning, it is Asynchronous, that is, it is unidirectional. When you give a promise to another person, you could either fulfil that promise or reject the promise, but, you can not both fulfil as well as reject a promise given. Similarly, in JavaScript, a Promise is Asynchronous in nature. Imagine a situation whereby you decided to apply for loan to start a new business. You make a loan application letter the next day and approach the Bank Manager. When ...