DEV Community

Cover image for Python for Beginners - Part 4 - Conditional logic, Collection and Loop
LUCIANO DE SOUSA PEREIRA
LUCIANO DE SOUSA PEREIRA

Posted on • Originally published at lucianopereira.netlify.com

Python for Beginners - Part 4 - Conditional logic, Collection and Loop

python_titulo

Fourth part of articles about the Microsoft's Python for Beginners series.
All the examples from the playlist are available in this GitHub repository: Python Examples.

Objective

You will learn how to work with conditional logics, collections and loops.
A Python file was created to demonstrate each example.

Topics

conditional.py

Conditional logic examples.

code13

Running the example:

python .\examples\conditional.py

The result:

code14

collection.py

Manipulating arrays and lists.

code15

Running the example:

python .\examples\collection.py

The result:

code16

loop.py

Controlling loops.

code17

Running the example:

python .\examples\loop.py

The result:

code18

Next

You will learn how to create functions, importing modules and creating virtual environments.

Video References

Top comments (0)