Skip to content

theanalyticschool/Python-Tutorials

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Tutorials

A collection of Python tutorials, examples, exercises, and projects covering Python programming fundamentals, data structures, functions, object-oriented programming, file handling, error handling, and practical application development.

About This Repository

This repository provides practical, beginner-friendly tutorials for learning Python programming.

It includes reusable code examples, exercises, and step-by-step demonstrations of important Python concepts. The repository is designed for students, analysts, developers, and data professionals who want to build a strong foundation in Python.

Repository Structure

Python-Tutorials/
│
├── tutorials/
│   └── dotenv-tutorial/
│       ├── .env.example
│       ├── dotenv_example.py
│       └── README.md
│
├── .gitignore
├── .python-version
├── pyproject.toml
├── uv.lock
└── README.md

The repository structure may evolve as additional tutorials and projects are added.

Requirements

To run the examples in this repository, install:

  • Python 3.12 or later
  • Git
  • Visual Studio Code or another Python-compatible editor
  • uv for Python project and dependency management

Getting Started

Clone the repository:

git clone https://github.com/theanalyticschool/Python-Tutorials.git

Navigate to the project directory:

cd Python-Tutorials

Create a virtual environment using uv:

uv venv --python 3.12

Activate the virtual environment in PowerShell:

.venv\Scripts\Activate.ps1

Run a Python file:

python filename.py

You can also run a Python file directly with uv:

uv run python filename.py

Example Python Program

def calculate_average(numbers: list[float]) -> float:
    """Return the average of a list of numbers."""
    if not numbers:
        raise ValueError("The numbers list cannot be empty.")

    return sum(numbers) / len(numbers)


values = [10, 20, 30, 40, 50]
average = calculate_average(values)

print(f"Average: {average}")

Contributing

Contributions, corrections, and suggestions are welcome.

To contribute:

  1. Fork the repository.
  2. Create a new branch.
  3. Make your changes.
  4. Commit your changes.
  5. Push the branch to your fork.
  6. Submit a pull request.

Disclaimer

The examples and projects in this repository are intended for educational purposes. Code should be reviewed, tested, and adapted before being used in production applications.

Author

Analytics School

GitHub: theanalyticschool

About

Python tutorials with practical examples covering core concepts, data analysis, automation, and real-world problem-solving.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages