Chinese morra in Python
I want to develop the Chinese morra game in Python, also known as paper, scissor or rock. I had fun making this game with Scratch as well. Those who want…
I want to develop the Chinese morra game in Python, also known as paper, scissor or rock. I had fun making this game with Scratch as well. Those who want…
In this lesson we will go through some examples of Python if statement, in order to consolidate the arguments studied so far. This Python tutorial is packed with exercises and…
In this lesson we propose some exercises on Python if statement, in order to consolidate what has been studied. First exercise on Python if statement Given in input the numerator…
Python dictionaries are data structures that contain elements (items) formed by a key (key) and a value (value). my_dict = {“key_1”: “value_1”, “key_2”: “value_2”, “key_3”: “value_3”, …} Let’s see a…
In this lesson we will study some functions of the Python Math module, to be able to use it in some exercises. The math module allows you to use some…
In this tutorial we will talk about how to fix errors in Python. Clearly at the beginning of programming in Python some mistakes will be made, but gradually they will…
We develop some exercises in Python in order to consolidate what we have studied so far. First exercise in Python Calculate the area of a circle by taking the radius…
In this lesson I will talk about Python list sort method which is useful for quickly sorting a list in ascending or descending order. So let’s create some examples to…
In this lesson we will learn how to create some examples of Python scripts, so let’s leave the interactive mode seen so far. One way to create scripts in Python…
Given two variables we create a Python program to swap their values. In this lesson, therefore, we will implement a simple algorithm for swap variables in Python, in order to…
In this lesson we will introduce comparison operators and Boolean operators in Python. We must first of all know that comparison operators are widely used in programming languages and are…
Il metodo toLowerCase in JavaScript è utilizzato per convertire tutti i caratteri di una stringa in lettere minuscole. Questo metodo è una funzione integrata in JavaScript che appartiene all’oggetto String.…
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…
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…
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…
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…
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…
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.…