Skip main navigation

New offer! Get 30% off one whole year of Unlimited learning. Subscribe for just £249.99 £174.99. T&Cs apply

Implementing a basic version

In the previous step, we visited the problem of a robot moving in space while avoiding obstacles. Let’s implement a first basic version of a program to solve the problem. …

Activity 6: Summary and consolidation

Congratulations on reaching the end of this course! Take a breath and realise this achievement. It is not easy to pick up new material and apply that material within a …

Practicing functions

The aim of this exercise is to improve the previous ‘guess the number’ game to make it better and more intelligent! You will implement functions to make the game better …

Activity 4: Summary and consolidation

Rafael provides a summary of the last activity. You have considered conditionals, such as ‘if’ statements, ‘else’ and ‘elif’. You have also explored For loops and While loops in Python. …

Exercises on loops

In these exercises, you will be able to practice writing loops in Python. We will provide you with some real-world problems that you will need to solve using loops. This …

While loops in Python

Rafael demonstrates how to use while loops in instances when we may not know in advance how many times we want to execute a piece of code.

For loops in Python

A loop is a piece of code that can repeat itself. Rafael demonstrates how to use for loops in Python, which is a way for a program to repeat a …

If statements

In this activity, you will practice your skill of writing if statements in Python. Imagine that a teacher in a high school asked you to create a computer program that …

What is a function in programming?

Rafael explains that functions are a named sequence of instructions to perform a specific task. He demonstrates how to use them when programming in Python.

Activity 5: Overview

This activity will introduce you to the concept of functions. These are chunks of code that you can use over and over again, instead of having to write them out …