Tag: iteration

Snowflake Challenge

Learning Objectives In this challenge we will use our Python Turtle skills to draw a snowflake. We will use iteration (For Loop) to recreate each branch of the snowflake. Step 1: The first branch First, let’s recap on the main

Gradient Generator

Learning Objectives By completing this challenge you will gain a good understanding of how RGB colour codes and hexadecimal colour codes work and you will apply this understanding to produce a complex algorithm. Challenge #1 Complete the code below so

Python Fractals

Fractal? A fractal is a curve or geometrical figure, which is based on a recurring pattern that repeats itself indefinitely at progressively smaller scales. Fractals are useful in modelling some structures (such as snowflakes), and in describing partly random or

Victor Vasarely’s Artwork revisited using Python

In this blog post we are looking at a specific painting from Victor Vasarely. The painting is from a serie of paintings called “Alphabet Plastique” and was painted in the 70’s. We are going to try to recreate this painting

Traffic Lights Challenge

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

Python Shapes using Turtle

Learning Objectives In this challenge we are going to use x and y coordinates to draw shapes on the screen. We will be using the turtle library to draw on the screen. X and Y coordinates? Quadrant? Check the above

Python Turtle Clock

This challenge consists of using the Python turtle library and the datetime library to create a program that displays the current time as an anlogue clock. To complete this challenge we need to do some angle calculations to understand what

Python Turtle Challenge

In this challenge we are going to use the turtle library to draw the following shape: Step 1: Run the code below: Step 2: Complete the code to draw the full shape. (You can complete the code in the Trinket

Python Patterns

Here is a quick challenge to focus on the use of loops, nested loops and string manipulation using Python. Let’s look at the following code: for i in range(0,9): st="" for j in range(0,i): st = st + " "

How to create a bouncing ball in Scratch

Step 1 – Change your main sprite to a ball Step 2 – Add the following script to your sprite:  This tutorial is available as a pdf: How to create a bouncing ball in Scratch See how to create a