Welcome to this repository containing a collection of Python scripts built while learning Python using the Bro Code tutorial. These scripts cover everything from basic programming concepts to GUI development, game programming, and API integration.
Follow these steps to set up your environment, build a virtual environment (venv), install the necessary packages, and run any of the scripts.
Make sure you have Python 3 installed on your system. You can verify it by running:
python --versionA virtual environment isolates your project packages from your global Python installation.
Run the following command in your terminal inside the project directory:
python -m venv venv- On Windows (PowerShell):
.\venv\Scripts\Activate.ps1
- On Windows (Command Prompt):
venv\Scripts\activate.bat
- On macOS / Linux:
source venv/bin/activate
(Once activated, you will see (venv) prepended to your command prompt).
Install all the required external libraries (such as PyQt5, pygame, requests, and qrcode) using the requirements.txt file:
pip install -r requirements.txtThis repository contains numbered files focusing on specific Python concepts:
- Core Python Basics: Data types, variables, loops, conditional statements, lists, dictionaries, functions, and string operations.
- File & Data Formats: Reading/writing standard text files, JSON (
json), and CSV (csv). - Object-Oriented Programming (OOP): Classes, inheritance, polymorphism, and abstract classes (
abcmodule). - GUI Application Development: Desktop UI projects built using the
PyQt5library (files66.pyto77.py). - Game Concepts & Multimedia: Clock, graphics, and music scripts using
pygame. - APIs & Web: Fetching network data using the
requestslibrary. - Utilities: Dynamic QR Code Generator (
QRcode.py).
Ensure your virtual environment is active, then execute any file using the python runner:
# Example: Run the QR code generator script
python QRcode.py
# Example: Run the PyQt5 GUI digital clock script
python 75.pyTo deactivate the virtual environment when you're done, simply run:
deactivate