Tag: iteration

BBC micro:bit – Traffic Light

In this challenge we are going to create and program a traffic light using lego bricks, leds and the BBC micro:bit. Check this video clip of the complete traffic light in operation: Step 1: Building the traffic light: Use a

3D Traffic Lights

Did you know? An embedded system is a computer system with a dedicated function within a larger mechanical or electrical system, often with real-time computing constraints. A burglar alarm, an in-car cruise control system, a speedometer on a bike, a

3D Solar System

In this blog post we will use Glowscript to create a 3D animation representing the revolution of the Earth around the Sun, and of the Moon around the Earth. Earth Revolution First, let’s calculate the angle of rotation needed to

3D Tetris Shapes

In this blog post we will use Glowscript to create a 3D animation representing the various shapes used in a game of Tetris. Our aim is to recreate each shape by joining several cubes together. We will then create a

3D Animation : Moon Phases

In this blog post we will use Glowscript to create a 3D animation representing how we perceive the moon from Earth throughout its cycle. Our aim is to represent a 3D sphere and to progressively change the direction of the

Coding Puzzles

Complete the following coding puzzles by drag and dropping the lines of codes in the correct order to recreate basic computer programs. Click on the picture below to access the coding puzzles:

The Collatz Conjecture

The Collatz conjecture is a famous mathematical mystery that has yet to be solved. It is named after Lothar Collatz a German mathematician, who first proposed it in 1937. It is based on the following number sequence: Start with any

Merry Christmas

For this challenge we are going to create Christmas Cards using Python turtle. We will use the random library to create unique cards. Starry Night Our first card consists of creating a starry night scene. This card is using: A

Sequencing, Selection & Iteration

When you write lines of code, there are three ways you can control the order these lines will be executed by the computer: Sequencing: This means that the computer will run your code in order, one line at a time

Beach Huts Challenge

Look at the code below to draw lines of beach huts. Your task is to tweak the code used to draw the third line of beach huts. On this line we want the computer to choose random colours from the