Skip to content

nbonacchi/python-programming

Repository files navigation

Python Programming

Binder

This repository contains the main resources for the Computer Programming 101 course using Python at ISPA-IU.

The course is based on jupyter notebooks and divided into 2 main modules called:

  • python-intro
    Introduction to Python variables, operators, boolean logic, data types, flow control, loops, and functions. With extra notebook containing classes, objects, and OOP basics.

  • python-data-science Introduction to basic Python libraries for data science, file IO, numpy, matplotlib and data visualization, pandas and data frames. With extra notebooks include a basic implementation of Conway's game of life, linear algebra and machine learning using scikit-learn, network analysys using networkx lib, regular expressions, signal processing using SciPy, text sentiment analysis and word clouds.

The course is designed to be self-paced and the notebooks are meant to be run either in vscode or in jupyter-lab.


Necessary dependencies

To run the files for this course you need some software installed on your machine.
Make sure you have vscode, git, and uv installed on your machine. You can download them from here:
These instructions should work for all (win, mac, linux) operating systems.

Git is a free and open source distributed version control system that allows you to track changes in code, collaborate with others, and maintain different versions of a project.
More info on git
Visual Studio Code is a free open source code editor developed by Microsoft.
More info on vscode
uv is a fast Python package manager and environment tool.
More info on uv

Installation steps

1. Install the required software

2. Install VS Code extensions

Open VS Code, go to the Extensions menu, and install:


Setting up the environment

After installing the required software, follow these steps to set up your environment:

  1. Open your terminal application (Anaconda Prompt, Terminal, PowerShell, etc.).

  2. Change directory to where you want to store the course files (e.g., Documents):

    cd ~/Documents

    On Windows, you may use:

    cd %USERPROFILE%\Documents
  3. Clone the repository:

    git clone https://github.com/nbonacchi/python-programming.git
    cd python-programming
  4. Install Python 3.13 using uv and create a virtual environment:

    uv python install 3.13
    uv venv
  5. Activate the virtual environment:

    • On macOS/Linux:

      source .venv/bin/activate
    • On Windows:

      .venv\Scripts\activate
  6. Install the required Python packages:

    uv pip install -r requirements.txt

Launching the notebooks

The easiest way to launch the notebooks is to use vscode.

  1. Open vscode and click on the file menu and then open folder.
  2. Select the folder with the course material (python-programming).
  3. Click on the view menu and then command palette.
  4. Type python: select interpreter and select the environment you created (the .venv folder).

Alternatively, you can run the notebooks from the command line.
To launch the notebooks, activate your virtual environment and run:

# On macOS/Linux
source .venv/bin/activate

# On Windows
.venv\Scripts\activate

jupyter-lab

You can now run the notebooks and start learning python programming


Credit

This course was adapted from the Digital Skills and Training initiative of the University of Edimburgh Information Services. The original files for the course can be found here and here.

About

Python programming course from scratch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published