Tag: Python

3D Solar System

moon-earth

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

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 Molecules

molecule-H2O

In this blog post we will use Glowscript to create a 3D animation representing the molecule H2O. Our aim is to recreate the molecule by joining three spheres together (one sphere for each atom). We will then create a compound

3D Animation : Moon Phases

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

The Collatz Conjecture

Collatz-Conjoncture

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

Guess the country

globe

For this challenge we are going to create a game where the user plays against the computer. The aim of this game is to guess the name of a country. The computer will give the player clues to help them

Haunted House

haunted-house

You are going to write a Python game where the user walks within the different rooms of a haunted house. In each room, something will happen. You will decide what happens when the user enters a room. You can use

Fireworks Display

fireworks

Coding is an Art Let’s first whatch this video clip which shows how a computer program can be used to create a large scale, live and interactive fireworks display: Fireworks Code Inspired by this application of computer science, we have

My daily routine

clock

Learning Objectives 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

Sweet Shop

sweets

Have you ever been in a sweet shop to buy sweets? For this challenge we are going to spend £5 in a sweet shop hence we need to find out how many sweets we can afford. We will want to