1. Course Introduction

Overview

In this lesson, we get a preview of the course ahead.

To explore more Kubicle data literacy subjects, please refer to our full library.

Summary

  1. Preface (00:23)

    In this course, we’ll be covering the essential intermediate components of Python. This includes functions, conditional statements, and iterative loops. We recommend that you start with our first course “Python Fundamentals” if you’re new to Python.

    Before we continue, it’s worth remembering that the process of interacting with our lesson/exercise/exam files can be a little tricky. To access these files, you first need to download them from Kubicle. When choosing a location to save these files, ensure that they’re somewhere that you can easily navigate to from Jupyter Notebook. Once downloaded, go to the Jupyter Notebook Home screen and navigate to the folder you saved your file in. You can then select the file to open it.

  2. Course Structure (01:51)

    This course has 3 main parts. 

    In the first part, we’ll learn about Python functions. These take data as an input, perform some operations on that data, and then provide an output. Given that, they’re exactly like mathematical functions or Excel formulas.

    In the second part, we’ll learn about conditional statements in Python. These allow us to write code that is only executed when a certain condition is met. This allows us to write different code for many different possible scenarios.

    In the third part, we’ll learn about loops. These allow us to write code that gets executed repeatedly. We start with for loops which we can use to execute the same code on every element in a list. We then move onto while loops that let us repeat the execution of some code until a certain condition has been met.

Transcript

Welcome to this first lesson on functions, conditionality and loops.

Before we learn about these concepts, we'd like to quickly remind you of the process of using the Jupyter Notebook files we'll be providing for this course.

Most lessons come with before and after files, which capture the notebook as it was in the beginning of the lesson and the end of the lesson.

To view these files, we first need to download them.

By default, Jupyter Notebook opens our personal folder so we'll make sure the downloaded files are stored there.

In this case, we have a folder called Cubicle Lesson Files.

We'll save the files here and navigate to Jupyter Notebook.

Here, we can open the cubicle lesson files folder, where we can find an open the file we just downloaded.

We'll now return to the course introduction.

The concepts covered in this course can be considered as intermediate Python skills.

We'll approach these concepts with the assumption that you, the learner, are already familiar with the basics of Python.

This includes performing basic calculations, understanding the different data types, storing values and variables, and adding multiple values to lists.

If you're unfamiliar with any of these concepts, we encourage you to check out our course on Python basics.

Let's now have a quick look at what we'll be covering in this course.

First, we'll familiarize ourselves with Python functions.

Like Excel functions, these take data as an input, perform some operations or calculations on that data and output a result.

We'll learn some of the most common functions and we'll even learn how to create our own functions that suit our specific needs.

We'll then look into conditionality.

Sometimes we want our code to have branching paths where different actions are triggered depending on certain conditions.

In this course, we'll show how to use conditional statements to perform different tax calculations based on different salaries.

Finally, we'll look into loops.

This is useful when we want to run some bits of code multiple times.

For example, if we have a list of salaries, we could perform our tax calculation on each salary in a list.

A Python loop allows us to do this without having to write the same code for every repetition.

In the next lesson, we'll learn about some basic functions.