Plot Matplotlib

plot matplotlib

In questa lezione studieremo come utilizzare plot in Matplotlib oer disegnare dei grafici. La funzione plot() è infatti utilizzata per disegnare vari tipi di grafici. Nel corso del tutorial vedremo vari esempi pratici. Disegniamo un grafico con la funzione Plot di Matplotlib Partiamo dunque con degli esempi per capire il funzionamento della funzione plot() ed … Leggi tutto

Python if else

Python if else

In Python, the conditional if else is used when we want to execute instructions only if a certain condition is true or if it is false. If a condition is false we can use the else. To be clear if else is the instruction that, using the flow charts, we have represented with the rhombus … Leggi tutto

Bubble Sort Python

Bubble sort Python

The bubble sort algorithm in Python is the topic of this lesson. Bubble sort is a very simple sorting algorithm to implement, but we must say that it is also inefficient. In fact, the bubble sort is mainly used in the didactic field to teach the logic and basics of programming. How bubble sort work … Leggi tutto

Python sort

Python sort

In questa lezione parleremo del metodo sort() di Python utile per ordinare velocemente una lista in ordine crescente o decrescente. Realizziamo dunque alcuni esempi per capirne il funzionamento. Ordinamento crescente/decrescente di una lista con Python sort Prendiamo in input una lista di numeri qualsiasi ed applichiamo il metodo sort su di essa per effettuare l’ordinamento … Leggi tutto

Casting Python

Casting Python

In this lesson we will tackle the concept of casting in Python. Casting is the operation that returns the value of an expression (or a variable) converted to another type. In fact, the variable remains of the original type anyway. For example we can convert string in int, int in string, string in float, etc. … Leggi tutto

For list Python

list for python

In this lesson I will do some examples of using the for loop with the list element in Python. For list Python – Print a list in reverse order using the for loop This problem can have several solutions, we will analyze some of them. The first solution makes use of the reversed() function, to … Leggi tutto

Python Compiler

Python Complier Online

Integrate a Python Compiler Online to test the code directly. Below you will find the basic version, scrolling the page you will find the compiler with the integration of some fundamental libraries for automatic calculation. Basic version of the Python Compiler Online: Write Python code using one of the most popular built-in compilers. Python Compiler … Leggi tutto

For in con le liste in Python

list for python

In questa lezione farò alcuni esempi di utilizzo del ciclo for … in sulle liste in Python. For in con le liste in Python In questo primo esempio dobbiamo stampare una lista in ordine inverso utilizzando il ciclo for in. Questo problema può avere diverse soluzioni, ne analizzeremo alcune. Prima soluzione – For in con … Leggi tutto

Install Python

install python

Install Python is very simple and we will see it in detail on all systems. But before installation let’s make a brief introduction to this amazing programming language Python is a language that adapts to multiple fields, such as websites, computer science, and artificial intelligence. During this tutorial we will therefore explore the various areas … Leggi tutto

Algoritmo Bubble Sort Python

Algoritmo Bubble Sort Python

L’algoritmo bubble sort in Python è l’argomento di questa lezione. Il bubble sort è un algoritmo di ordinamento molto semplice da implementare, ma dobbiamo dire che è anche poco efficiente. Infatti il bubble sort è utilizzato principalmente in ambito didattico per far apprendere le logiche e le basi della programmazione. Il funzionamento del bubble sort è … Leggi tutto

Assignment Operators Python

Assignment Operators Python

Assignment operators in Python, and in other language programming, are used to assign values ​​to variables. For example, if we indicate a = 5 and b = 3 we are assigning the value 5 to the variable a and the value 3 to the variable b. But let’s see in detail what other assignment operators … Leggi tutto

Python max()

Python max

In this lesson we will look for the maximum value of a list in Python either by using the Python max() function, or by building our own algorithm. Exercise – Python max() Populate a list with 20 numbers of your choice. After entering, view all the elements of the list with their index.Then find the … Leggi tutto

Maximum N numbers in Python

Maximum N numbers in Python

Let’s create an algorithm that calculates the maximum of N numbers in Python, that is, it determines the greater value of the numbers entered from the keyboard. Later in the tutorial we will use Python max() on lists and tuples. It is important to train the mind to find solutions even if there are functions … Leggi tutto

Coding

coding

Il coding tradotto letteralmente vuol dire programmazione, ma più in generale con questo termine si intende una disciplina che ha come base il pensiero computazionale. Dunque, con il termine di coding, racchiudiamo tutti quei processi mentali che mirano alla risoluzione di problemi. Il coding è alla portata di tutti e può essere proposto a scuola … Leggi tutto

Strings Python

Strings Python

In this lesson we will cover strings in Python. To declare a variable of type string just assign it a text enclosed in single quotes or double quotes. So let’s take an example: >>>phrase = ‘Coding creativo’ or, in the same way: >>>phrase = “Coding creativo” String operators in Python + string concatenation. *repetition of … Leggi tutto

C++ random

c++ random

C++ random – La libreria del linguaggio C++ include alcune funzioni per il calcolo dei numeri pseudo casuali, ovvero dei numeri random. Avevamo già studiato in C, come generare i numeri random in questa lezione: array con numeri random in C. Quindi analizzeremo innanzitutto la funzione rand() in C++ che serve a generare dei numeri … Leggi tutto

Python Compiler Online

Python Complier Online

Integriamo un Python Compiler Online per provare direttamente il funzionamento del codice. In basso troverete la versione base, scorrendo nella pagina troverete il compiler con l’integrazione di alcune librerie fondamentali per il calcolo automatico. Versione Base del Python Compiler Online: Scrivi codice Python utilizzando uno dei più conosciuti compilatori integrati. Python Compiler Online with Libreries … Leggi tutto

Print Python

Print Python

The Python print() function is used to print the output. The print function accepts any number of parameters and inside the tinde brackets we can specify a string, a variable, or both. Printing takes place on one line of text. Sintax print Python print(value (s), sep = ”, end = ‘\ n’, file = file, … Leggi tutto