Welcome to the Python Basics repository! This is a collection of simple scripts and projects designed to help beginners learn and practice fundamental Python concepts.
This repository contains a series of assignments and small projects that cover core Python topics, including:
- Data Types (strings, integers, lists, dictionaries)
- Control Flow (if/else, for/while loops)
- Functions and Modules
- File I/O
- Object-Oriented Programming (Classes)
- Working with External Libraries (e.g., Pillow)
Here are some of the projects you can find in this repository:
A script that solves a Wordle-like game called WordyPy.
- Concepts: Algorithmic thinking, list comprehensions, working with external modules, and basic game logic.
- Libraries:
PIL(Pillow) for image processing,random.
A command-line calculator that performs basic arithmetic operations.
- Concepts: Handling user input, functions, and conditional logic.
A utility script to organize files in a directory based on their extension.
- Concepts: File system operations (
os,shutil), loops, and dictionaries.
Make sure you have Python 3 installed on your system.
python --version-
Clone the repository to your local machine:
git clone https://github.com/your-username/python-basics.git cd python-basics -
It's recommended to use a virtual environment to manage dependencies for each project.
# Create a virtual environment python -m venv venv # Activate it (on Windows) .\venv\Scripts\activate # Activate it (on macOS/Linux) source venv/bin/activate
-
Install the required packages for a specific project. For example, for the WordyPy solver:
pip install -r assignments/course5_assignment3/requirements.txt
To run any script, navigate to its directory and execute it with Python.
For example, to run the WordyPy solver's autograder:
python assignments/course5_assignment3/solver.pyContributions are welcome! If you have a simple project that demonstrates a core Python concept, feel free to fork the repository and submit a pull request.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingProject) - Commit your Changes (
git commit -m 'Add some AmazingProject') - Push to the Branch (
git push origin feature/AmazingProject) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE.md file for details.