In this repository you'll find projects that I created following Curso Profesional de Python, a Python :snake: mid level course from Platzi.
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
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
# Using linux or mac
python3 palindrome.py
# Using windows
py palindrome.py
Checking static typing
mypy palindrome.py --check-untyped-defs
A number is odd when it can't be divisible by 2.
# Using linux or mac
python3 odd.py
# Using windows
py odd.py
Checking static typing
mypy odd.py --check-untyped-defs
With this project I've ben practiced the closure concept. You'll find two functions.
- Text repeater
- Multiplier
# Using linux or mac
python3 closures.py
# Using windows
py closures.py
This is just a simple practice to understand decorator concept.
# Using linux or mac
python3 decorators.py
# Using windows
py decorators.py
This is just a simple practice to understand how iterators work.
In file iterators.py
you'll find two classes
EvenNumbers
: Generate an iterator of all even numbers, unless you put a max number to stop the program.Fibonacci
: Generate an iterator of all fibonacci succesion, unless you put a specific number to get its fibonacci.
# Using linux or mac
python3 iterators.py
# Using windows
py iterators.py
Little project that wrap all functional exercises created in this repo. I hope you enjoy it 😄
# Using linux or mac
python3 main.py
# Using windows
py main.py