Python read()
In this lesson we will study the Python read() method. Let’s start with a simple example that uses the address_book.txt file, the quake contains two simple example contacts. We open…
In this lesson we will study the Python read() method. Let’s start with a simple example that uses the address_book.txt file, the quake contains two simple example contacts. We open…
In this lesson we will talk about Python readlines() method, which reads the entire text file and returns a list. Python readlines() – first example In this first example we…
In this lesson we will study Python readline() method required for reading a text file. This method returns a line of characters, including the newline character, which is the \…
In this lesson we will deepen the Python write() method and in particular we will store input data in text files in Python. We will create a simple address book…
In Python we can write to file and in this lesson we will study how to do it. After opening the file for writing we can in fact write to…
We will learn about the Python open() function, that is, we will see how to open a text or binary file. In the previous lesson we talked about files and…
In this lesson we will study how to perform operations with files in Python. In fact, in Python, as in other programming languages, you have functions for Input / Output…
In questa lezione svolgeremo un esercizio sui file in Python, al fine di ripassare quanto studiato sinora. Supponiamo di avere un file di studenti, dova abbiamo salvato i nomi ed…
In questa lezione studieremo il metodo read per leggere in un file in Python. Partiamo subito con un semplice esempio che utilizza il file rubrica.txt il quake contiene due semplici…
In questa lezione parleremo del metodo readlines in Python che legge tutto il file di testo e restituisce una lista. readlines Python – primo esempio In questo primo esempio leggeremo…
In questo articolo, esploreremo la creazione di un counter in JavaScript, fornendo implementazioni che consentono sia l’incremento che il decremento in modi diversificati e interessanti. Realizziamo un counter in JavaScript…
In this lesson we will create a simple JavaScript to do list, a classic JavaScript exercise that allows you to experiment with the methods learned so far. To carry out…
In questa lezione realizzeremo una semplice to do list in JavaScript. Si tratta di un esercizio classico che ci permetterà di mettere in pratica i concetti appresi finora e di…
The eval function in JavaScript evaluates the expression passed as an argument and executes it if there is an operation. The syntax is as follows: eval(string). JavaScript eval examples Here…
In this lesson we will study the JavaScript String function that is used to return a string from a value passed as an argument. The syntax is as follows: string(object).…
In JavaScript the parseFloat function takes a string as an argument and returns a decimal number. The syntax is therefore the following: parseFloat(string). Where string represents the string to convert.…
In this lesson we build in JavaScript a simple multiplication table. To make this example, we will therefore create an html table and in each cell we will insert our…
In this lesson we develop a prime number algorithm in JavaScript. First of all, remember that a number is prime when it has two divisors, namely 1 and itself. The…