Tag: Python Turtle

Archery Scoring Algorithm

In this challenge we will write a Python program to randomly shoot an arrow on a target. We will then use Pythagoras’ Theorem to calculate the distance between the arrow impact and the centre of the target. This distance will

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

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

My Charts

For this challenge we are going to use Python turtle to create some charts: Column charts, line charts and radar charts. First we need a data set. We will use the following data that shows the market share of the

Avatar Generator

In this challenge we will use Python Turtle to create avatars. (An avatar is an icon representing a particular person in a computer game, Internet forum, etc.) Try the code below. This code is using a few computing concepts such

Rainbow Challenge

In this challenge we are going to use our coding skills to create some nice colour patterns. We will first look at the code given to create a rainbow effect to understand how it works. We will then adapt this

Turtle Maze Challenge

Your challenge is to guide the turtle through the maze. To do so you will need to use the following instructions: myPen.forward(100) to move forward by 100 pixels, myPen.right(90) to turn right by 90 degrees, myPen.left(90) to turn left by

Batman vs. Python Turtle

For this challenge we are focusing on a set of equations used to draw different sections of the Batman logo: f(x) = 1.5*sqrt((‑abs(abs(x) – 1)) * abs(3 – abs(x))/((abs(x) – 1)*(3 – abs(x)))) * (1+abs(abs(x) – 3)/(abs(x)- 3)) * sqrt(1

Optical Illusions

Which of the above two purple circles is bigger? Learning Objectives In this challenge you will use Python Turtle to draw geometric shapes and optical illusions. To help you we have created three functions as follows: drawLine() to draw a

Battleship Challenge

For this challenge we are not going to recreate a full battleship game. Instead we are going to focus on randomly placing the ships on the grid using an algorithm. The code given below uses Python Turtle to draw the