Chapter 1: Introduction

Running Python

face Josiah Wang

Ok, now that you have an overview of the main syntax differences between Java and Python, it is time to get your hands dirty with the details. Let’s bring Python out on a test drive!

We will use Python 3 for this crash course (Python 2 is no longer officially supported). I will assume that you already have Python version 3.10 (or above) installed on your computer. This is the version installed on the department’s lab machines, and is most likely what you will need for most of your courses, including the Introduction to Machine Learning course.

If you are using a lab computer, then this should already be available.

If you are using your own computer and do not yet have Python installed, please follow the instructions for your operating system in my Python course materials (I teach the Python Programming module for some MSc students, in case you were wondering). Come back to this page once you have installed Python.

Check your version of Python by typing the following into the command line.

$ python -V
Python 3.10.12