Matplotlib Plot

Matplotlib Plot

In this lesson we will study how to use Matplotlib plot to draw graphs. The plot() function is in fact used to draw various types of graphs. Throughout the tutorial we will see various practical examples. Let’s draw a graph with Matplotlib Plot function So let’s start with some examples to understand how the plot() … 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

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

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

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

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

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

Variables Python

variables python

Today we will talk about variables in Python. Recall that variables are memory spaces where information is stored. This information can be numeric or string. Variables names in Python The variables are assigned a name, as already mentioned in the other tutorials, the names of the variables must be given with common sense, in order … Leggi tutto