Examples I will start a series of posts with some examples to develop with the Python programming language. The idea is to assimilate concepts of language through research to solve problems. The first problem to solve will be: Python example 1 Print on screen the first 20 numbers…
Category: Programming
Programming category
Programming with Python Class 9
Data Structures – Dictionaries A dictionary is a sequence of key pairs, a value that can be of any type. They are used to search the sequence associatively for a key rather than an index as in lists. Typical use is to implement a dictionary between two languages …
Programming with Python Class 8
Data structures – Lists A list is a sequence of variable length. Lists can be modified and items can be added and removed from the list. A list is defined as a sequence of objects separated as commas and enclosed in [] An empty list can be defined with []…
Programming with Python Class 7
Data structures – Tuples A tuple in Python is a sequence of objects. They are used when we want to treat a sequence as a single object. Examples of tuples can be the coordinates (x, y) or the definition of a color with its red, blue and green components (r,…
Programming with Python Class 6
Functions A function is a sequence of actions that perform an operation and that can be identified by a name. The functions allow us . have a more structured code . avoid code repetition . is the basis of structured programming . can be reused with other programs …