/python-profesional

Mid level projects by Platzi's course "Curso profesional de Python"

Primary LanguagePython

Hey there! 🧑‍🚀

In this repository you'll find projects that I created following Curso Profesional de Python, a Python :snake: mid level course from Platzi.

Virtual env & dependencies

Before run this poject, you have to create a virtual env.

cd app
python3 -m venv env
source env/bin/activate
pip3 install -r requirements.txt

Palindrome

If a word or sentence can be read in the same way forward and backward then we can say that is a palindrome.

"Ana" ✅ Is palindrome
"Paola" ❌ Is not a palindrome
"Anita laba la tina" ✅ Is a palindrome
"Hola mundo" ❌ Is not a palindrome

Run this project

# Using linux or mac
python3 palindrome.py
# Using windows
py palindrome.py

Checking static typing

mypy palindrome.py --check-untyped-defs

Odd

A number is odd when it can't be divisible by 2.

Run this project

# Using linux or mac
python3 odd.py
# Using windows
py odd.py

Checking static typing

mypy odd.py --check-untyped-defs

Closures

With this project I've ben practiced the closure concept. You'll find two functions.

  1. Text repeater
  2. Multiplier

Run this project

# Using linux or mac
python3 closures.py
# Using windows
py closures.py

Decorators

This is just a simple practice to understand decorator concept.

Run this example

# Using linux or mac
python3 decorators.py
# Using windows
py decorators.py

Iterators

This is just a simple practice to understand how iterators work. In file iterators.py you'll find two classes

  1. EvenNumbers: Generate an iterator of all even numbers, unless you put a max number to stop the program.
  2. Fibonacci: Generate an iterator of all fibonacci succesion, unless you put a specific number to get its fibonacci.

Run this example

# Using linux or mac
python3 iterators.py
# Using windows
py iterators.py

Playground

Little project that wrap all functional exercises created in this repo. I hope you enjoy it 😄

Run this example

# Using linux or mac
python3 main.py
# Using windows
py main.py