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.
-
Level: Beginner
-
Duration: 4 hours
- Store data in variables and collections.
- Perform basic operations on these data.
- Use control flow and loops to write powerful code.
- Define functions to create repeatable units of behaviour.
- Basic computer science knowledge of data types and control structures is an asset.
- To be able to participate in the exercises, participants must either:
- Have a Google Account to run in-browser as a Colab notebook (preferred).
- 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.
- All we need for this workshop is a Google account to open Colab.
Please open the Jupyter notebook.
- Link to Jupyter notebook - https://colab.research.google.com/github/QLS-MiCM/IntroToPython/blob/main/Exercises/Script/IntroToPython.ipynb
- Link to Juoyter notebook with solutions - https://colab.research.google.com/github/QLS-MiCM/blob/main/IntroToPython/Exercises/results/IntroToPython.ipynb
Material partially adapted from Benjamin Rudski and Najia Bouaddouch
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.