Welcome to python-basics-and-syntax, a beginner-friendly learning repository from the practice-python-for-beginners organization.
This repository focuses on introducing core Python concepts β including syntax, data types, and variables β with hands-on examples and unit tests to help learners verify their understanding.
- Variables and data types
- Basic arithmetic operations
- Strings and formatting
- Writing and running simple test cases
-
Clone this repository:
git clone https://github.com/practice-python-for-beginners/python-basics-and-syntax.git cd python-basics-and-syntax -
(Optional) Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies (only
pytestneeded):pip install -r requirements.txt
python-basics-and-syntax/
β
βββ LICENSE
βββ README.md
β
βββ exercises/
β βββ variables_and_types.py
β βββ basic_operations.py
β βββ strings_and_formatting.py
β βββ tests/
β βββ test_variables_and_types.py
β βββ test_basic_operations.py
β βββ test_strings_and_formatting.py
β
βββ requirements.txt
Each script in the exercises/ folder demonstrates a fundamental Python concept.
You can:
- Read the code and comments.
- Edit and run the exercises to experiment.
- Use the provided tests to validate your understanding.
Run all tests using:
pytestThis repository is licensed under the GNU General Public License v3.0 (GNU GPLv3).
See LICENSE for details.
Happy coding!