Skip to content

bzrudski/Intro-to-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intro to Python Workshop

Open student version in Colab Open solutions version in Colab

Overview

In this 4-hour workshop, participants will be introduced to the basics of programming in Python. Students will journey from the beginnings of creating variables and performing simple mathematical operations to writing code that can perform fundamental tasks and wrapping this code into functions. Participants will learn how to write the important building blocks that make up complex programs.

Learning Objectives

  1. Store data in variables and collections.
  2. Perform basic operations on these data.
  3. Use control flow and loops to write powerful code.
  4. Define functions to create repeatable units of behaviour.

Prerequisites

  • Basic computer science knowledge of data types and control structures.
  • No prior programming experience is required, but knowing another language may help.
  • To be able to participate in the exercises, participants must either:
    • Have a local installation of Python and Jupyter notebooks. Microsoft Visual Studio Code with the Python extension installed can also be used to run the Notebook.
    • Have a Google Account (to run in-browser as a Colab notebook)

Setup Information

See SETUP.md for full setup information. After setting up Python, you can download the material as a ZIP file using the green button higher up on this page, or by cloning this repository:

git clone https://github.com/bzrudski/Intro-to-Python.git

Requirements

To take full advantage of this interactive workshop, you must have access to a Python environment and Jupyter Lab.

Local

The required steps depend on how you installed Python:

  • (Recommended) If you installed minconda, you can easily install Jupyter Lab by running the following on the command line:
conda install -c conda-forge jupyterlab
  • If you installed Python from the official website, you can easily install Jupyter using pip by running the following on the command line:
pip install jupyterlab
  • If you installed Anaconda, you already have Jupyter Lab installed.

For more details on installing Jupyter Lab, see https://jupyter.org/install.

Once you have Jupyter installed, open the Intro-to-Python folder on your computer and launch Jupyter Lab by typing:

jupyter lab

Then you can open the Jupyter notebook files.

Cloud

If you don't want to install anything locally, you can open the workshop materials using Google Colab:

Outline

For a more detailed outline, see Outline/Intro-to-Python-Outline.md.

  1. Module 1 -- Python Basics
  2. Module 2 -- Strings and Collections: An Object Primer
  3. Module 3 -- Introduction to Functions
  4. Module 4 -- Where to go from here

References

This workshop is based on my previous iterations of the workshop, which can be found at the following repositories:

Colab badge created using https://shields.io.


Workshop created as part of the McGill Initiative in Computational Medicine.

For more information about the QLS-MiCM, visit: https://www.mcgill.ca/micm/.

The contents of this repository are licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.

CC-BY-SA

About

Intro to Python QLS-MiCM workshop.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published