JavaScript array length
The length property used on arrays in JavaScript is useful for determining how many elements are contained in an array. This property is also used to determine the length of…
The length property used on arrays in JavaScript is useful for determining how many elements are contained in an array. This property is also used to determine the length of…
We study some JavaScript methods to add an attribute to elements. In particular, in this lesson we will use createAttribute() and setAttributeNode(). In the previous article we saw how to…
We continue our tutorial in JavaScript using the createTextNode method, which is the method that allows us to insert text into a node. In fact, after having created a new…
In this lesson we will learn how to use nested loops in Python, that is, iterations that run inside other iterations. So, let’s take some examples to understand how they…
Caesar cipher decoder developed using JavaScript. Try entering a text in the plain text input box and also choose a numeric key, then click on the digit button to get…
Python Examples – In this lesson we will do other examples in Python using the for loop. We therefore propose some algorithms to better understand the meaning of the iterative…
We will perform other for loop examples in Python in order to consolidate what we have studied so far. For loop examples Python – first example Design an algorithm that…
In the previous Python lesson we studied prime numbers, here is the link of the lesson. Now we will develop a Python algorithm for prime numbers from 2 to N.…
In this lesson we will study indefinite loop in Python, that is loops where the number of iterations is not known at the beginning of the loop. Let’s take some…
In this lesson we will make a program on friendly numbers in Python, in order to practice with iterative structures. Recall that two numbers are said to be friendly if…
In this lesson we will develop the Euclidean algorithm in Python. Euclid’s algorithm is a method used to find the greatest common divisor between two integers. By greatest common factor,…
The append method in Python, discussed in the last lesson, is used to insert items at the end of a list. The syntax of this method is as follows: list.append…
Let’s create a program on prime numbers in Python using the iterative structures studied so far, in order to deepen them. So, let’s remember the definition of prime number: A…
Let’s improve our knowledge in Python with some while loop exercises. In particular, today we will face an exercise that also deals with the exchange of variables as a topic.…
In this tutorial we will make the number guessing game in Python, also known as the high-low game. That is, let’s imagine that the computer thinks a number in a…
In this lesson, I propose an exercise that still uses the method Python insert. Python Insert – First exercise Insert 20 random numbers from 50 to 150 at the top…
In this Python lesson we will give some for loop examples, in order to better understand how it works and develop logical thinking. Python for loop examples – first example…
In Python how can we add elements to a list? We have already said that we can use various methods, in this lesson we will see practical examples. Exercise –…