Python code

excepciones en python exceptions in python

Python Exceptions

Python Exceptions Python Exceptions handling is essential if you want to develop robust and unbreakable programmes. In short, exception handling in Python is the process of responding to unexpected situations that arise during programme execution. On the other hand,...

draw a square with python dibujar con python

Draw a square with Python

Draw a Square with Python and Turtle library We will draw a Square with Python and the Turtle library using the code of various shapes. The  Turtle library  is based on the LOGO language, used in the introduction to programming for children. This module allows us to...

calculadora con código python calculator with python code

Calculator with Python code

Python code | How to do a calculator The aim of this article is for you to know how to do a Calculator with Python code. This Python code exercise is based on creating a basic program to be able to carry out simple operations as a calculator does. First of all, the...

Diccionario en python dictionary in python

Dictionary in Python

Dictionaries in Python Language A dictionary in Python is a collection of pairwise information in the format key:values. The correct syntax is { key : value } The Python dictionary also stores multiple pieces of information like Lists in Python do, but with the...

python comprehensions comprehension in python

Comprehension in Python

Comprehension types in Python Comprehension in Python is an easy way to loop over a sequence with less code. It is also a more modern and ordered way to code. It allows us to use a simpler and shorter syntax for any operation we do with loops. In this article we will...

figuras en python

Create Polygons with Python

How to create polygons with Python We are going to learn how to create polygons with Python, using the Turtle module. We presume that you already know the basics about this library, otherwise you can look at this post about how to draw a square with python. We have...

python lists methods python listas

Python List Methods

Python List Methods Python list methods are an important part of the Python programming language. In this article we will see several methods for Python lists. At the same time, we must understand that if we have a variable with a sequence of values that is what we...

exercises python lists ejercicios de listas en python

Exercises Python Lists

Practical Exercises Python Lists In this post we are going to learn Python with practical exercises of Python lists aiming help you to understand them a little better. The first exercise of python lists is about defining a function that we will call sum. This function...