Python maximum
In this lesson we will write a Python program to find the maximum between two numbers, in order to put into practice what we have studied so far. Python Program…
In this lesson we will write a Python program to find the maximum between two numbers, in order to put into practice what we have studied so far. Python Program…
In this lesson I will give examples using nested if statement in Python. Defining nestings means, in a nutshell, that you can insert ifs within other ifs or within the…
The if elif else construct in Python allows the nesting of multiple if statements, i.e. if then otherwise statements. In fact in the Python language to implement the multiple selection,…
In this lesson I propose some examples on the while in Python, in order to consolidate the argument on iterations. First example on the while in Python Input data 10…
In this lesson we will do some examples on the use of the while loop in Python, in order to consolidate what was explained in the last lesson. while loop…
In this lesson we will study the while loop in Python. Recall, then, that a while loop is a control structure that allows you to execute a sequence of statements,…
In this lesson we will cover some simple exercises on the Python language. Exercises Python – first exercise Take as input the hypotenuse and the cathetus of a right triangle…
In this lesson we try to implement a simple Python if example, to learn more about using conditional statements. I take three numbers as input and check if they can…
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…