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. …
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 …
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 …
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. …
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 …
Parameters While exploring functions, the word parameter was introduced. Parameters are defined variables in the function that are required for the function to perform its computation. For example, the following …
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 …
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.
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 …