Introduction to Data Types

Welcome to the 2025 SCIF10002 Introduction to Coding and Data Analysis for Scientists course!

Table of Contents

Using the Notebooks

The file you have open is aJupyter Notebook. This is an interactive Python environment where you can both write and run code. All of the interactive parts of this course will take place in Jupyter notebooks.

Each notebook is made up of two types of cells:
- Text cells (like this one), which introduce and explain new topics.
- Code cells, which contain Python code you can run and modify.

To run a code cell, click inside it and press Shift + Enter. You can also edit the code before running it. Give it a try in the cell below!

Today’s Material

Today, we will be learning about data types. As there is a range of ability in the class we have prepared three options for today’s work.

Important: For today, please choose just one of the options below. You’ll have many opportunities to revisit the other concepts later in the course, so focus on building confidence with the Beginner material before tackling more advanced work.

Option 1: Beginner

If you are new to coding, or still building confidence in Python, today you should work through the Basic Data Types notebook linked below:

In this notebook you will find interactive code blocks and plenty of exercises. Coding is best learned by doing, so take your time to work through the material and attempt as many exercises as you can during today’s session!

Option 2: Intermediate

If you have some coding experience and are already somewhat familiar with basic data types in Python, you may wish to choose this option.

First, please do check over the exercises in the Basic Data Types notebook and ensure you can answer them. Even the most experienced programmers will have gaps in their knowledge, so it is important you check this.

Once you feel confident with the material above, move on to the Collections notebook. This will introduce you to Python’s built-in collections and highlight the differences between sets, lists, dicts, and tuples. As always, aim to complete as many of the exercises as you can.

Option 3: Advanced

If you are an experienced programmer with a strong grasp of Python, begin by reviewing the exercises in the notebooks below to ensure you are fully comfortable with the material:

Once you are confident in your understanding, move on to the following notebook:

Getting Help

There is a lot to remember when first learning Python. To get more help see the Python API. Another useful link is the W3 schools series on Python which is very good, especially for new users. Another way to get help if you are ever unsure what a function is doing is to use thehelp function in the Python terminal like so:

In class, you can ask for help from the lecturer, demonstrators and your peers around you. We advise you do not ask AI for help unless you are really stuck.