Managed, maintained and run by the Scientific Software Group at the Institute of Cancer Research.
This is an introductory course for those seeking to learn Python. The course is split into two parts
- Part A: An introduction to programming in Python
- Part B: Basic programming with Python
Part A is designed for those with no prior exposure to programming, whilst part B is for those with some exposure to programming, Python or otherwise.
The former has a strong focus on the fundamentals of the language with short exercises peppered throughout to affirm your understanding. The latter runs at a sligthly faster pace, and whilst having a simlar course structure and content, involves more complex problems and goes slightly further.
Each course is self contained enough to be taken independently, though you may wish to take them in term to reinforce and build upon your understanding.
This course is delivered in the form of Jupyter Notebooks, and is intended to be worked on in an interactive (live-coding) sort of way. Before you join the course, we therefore ask you to have installed Jupyter Lab on your own laptop, and to bring your laptop with you to the session.
We recommend installing Python and Jupyter Lab as part of the Anaconda Distribution.
- Head to this link and download Anaconda for your relevant operating system.
- If there is an option to select the Python version, select a 3.x. The default download choice should be 3.x.
- Open up the installer and follow the default installation procedure.
- If there is an option to "Add Anaconda to my PATH environment variable", ensure this is checked.
- If these is an option to "Register Anaconda as my default Python", ensure this is checked.
Once the download has completed, we will need to open a terminal
- Windows users
- Press start
- Type "Anaconda PowerShell" and open the application
- MacOS users
- Press cmd
- Type "Terminal" and open the application
Once you have opened the terminal type the following command and press enter:
python --version
This should print something to your terminal that looks similar to Python 3.x.y :: Anaconda 2023 ...
Now type the following command into your terminal and press enter:
jupyter lab
This should stream an output to your terminal, and start a Jupyter Lab session inside your browser. The browser sesion should look a bit like this:
If you run into any permission issues with the download or installation, please contact [email protected]. If you have any issues verifying your installation, please contact [email protected].
For those familiar with git
, simply navigate to a directory you want to keep the files in, then:
git clone [email protected]:instituteofcancerresearch/intro-to-python.git
cd intro-to-python
jupyter lab
Otherwise, download and decompress the zip files manually as shown below
Assuming you have decompressed the zip file within the default "Downloads" folder, open up your terminal once again, then
- Windows Users
cd Downloads cd intro-to-python jupyter lab
- Mac OS users
cd ~/Downloads cd intro-to-python jupyter lab
If necessary there is the option to uise an online version of Jupyter Lab, though this is not recommended as it is not as reliable as the local installation and you will not be able to keep and return to your work in the same way. To access this version click:
Jupyter online
You will still need to download the files as per the instructions above, and then upload them into this online version of Jupyter Lab. The sub directory structure will need to be created manually.