Skip to content

fernandosc14/Python3-Basics-to-Advanced

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Course Exercises

This repository contains exercises and example files created while following the Udemy course "Python 3 - Do Zero ao Avançado" (https://www.udemy.com/course/python-3-do-zero-ao-avancado).

About

The files here are practice code for learning Python concepts and standard library usage. The code is organized across many lesson files (e.g. aulaXX.py) and small folders with specific examples.

This README gives a short overview and instructions to run examples locally.


Topics Covered (selected)

  • Python basics: variables, control flow, functions, list/dict/set operations
  • Data structures: lists, tuples, sets, dictionaries
  • File I/O and CSV/JSON handling
  • Functions: *args, **kwargs, lambda, closures
  • Object-oriented programming: classes, __init__, __repr__, __str__, __new__, properties (@property), setters
  • Decorators and higher-order functions
  • Generators and yield
  • Iterators and implementing sequence/iterator protocols
  • Error handling and try/except
  • Modules and packages
  • Virtual environments (venv) and dependency management
  • Working with OS: os, shutil, path manipulation
  • Docker Compose and using MySQL inside Docker for development
  • Advanced topics touched: abstract base classes, metaclasses (overview), __call__ behavior

Notable files and folders

  • aula*.py — lesson files, many small scripts demonstrating individual topics
  • modulo4/ — examples for functions, lambda, closures, etc.
  • aula161.py — example implementing a simple custom sequence/iterator
  • aula173.py — file/OS examples using os and shutil
  • aula206/ — contains a docker-compose.yml and examples that use a MySQL container for exercises
  • requirements.txt — Python dependencies (if present)

Quick setup and run (Windows PowerShell)

  1. Create and activate a virtual environment (recommended):
python -m venv venv
.\venv\Scripts\Activate.ps1
  1. Install dependencies (if requirements.txt exists):
pip install -r requirements.txt
  1. Run a lesson script directly:
python aula82.py
  1. Docker (for aula206 MySQL example):

Start containers (in aula206 folder):

cd aula206
docker-compose up -d

Stop containers:

docker-compose down

If the MySQL container reports InnoDB errors at startup, you may need to remove the mysql_206 data directory inside the aula206 folder to recreate a clean database (this will delete any stored data):

docker-compose down
Remove-Item -Recurse -Force .\mysql_206
docker-compose up -d

Running the examples that connect to MySQL

Some scripts use environment variables to connect to the DB. You can set them in PowerShell before running the script:

$env:MYSQL_HOST = '127.0.0.1'
$env:MYSQL_PORT = '3306'
$env:MYSQL_USER = 'root'
$env:MYSQL_PASSWORD = 'your_password'
$env:MYSQL_DATABASE = 'your_database'
python main.py

Note: MySQL 8 uses caching_sha2_password authentication by default. If a Python client library requires it, install the cryptography package:

pip install cryptography

Also in some GUI clients (like DBeaver) you may need to enable allowPublicKeyRetrieval=true in the driver properties.

Docstrings and code style

Some files include automatically-generated docstring skeletons. Replace placeholder sections like _summary_, _type_ and _description_ with real descriptions for better documentation. Consider using linting and formatting tools (e.g. flake8, black) to keep the code consistent.

Contributing / Notes

This repository is a personal learning workspace with many small example files. Use it as a study reference. If you want to keep changes or share improvements, it's recommended to add tests or small README notes per folder describing the exercise intent.

About

Collection of Python course exercises and examples (Udemy 'Zero to Advanced').

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published