Mathematics Scratch
Expert
45 mins
215 points
What you need:

Around the World part 1

In this project we will do some math to calculate how long it would take to walk, drive or fly all the way around the world! This project comes in 2 parts, this part 1.

1 - Create a new Scratch project

Create a new Scratch project and delete the cat sprite.

https://scratch.mit.edu

2 - Add a backdrop

Add the 'Stars' backdrop to your project from the backdrop library.


3 - Create some variables

In this lesson we will be calculating how long it takes to go all the way around the world depending on what speed you are travelling. The circumference of the earth is 40,075 kilometers around so the math formulas we will be using are:

  • how long in hours = 40,075 / speed (kilometers per hour).
  • how long in days = (40,075 / speed) / 24 (we divide by 24 as there are 24 hours in a day).

To help us with these formulas we will need two variables. Create two new variables by clicking the 'Make a Variable' button.

  1. 'earth' this will store the circumference of the earth (40,075 km)
  2. 'amount' this will store the answer when we perform a calculation

4 - Add the earth sprite

Add the 'Earth' sprite to your project from the sprite library and then give it the following code.

when green flag clicked hide variable [amount v] hide variable [earth v] set [earth v] to (40075) // the earth's circumference go to x (0) y (0) // place it in the center



5 - Give the instructions

Next lets use some say Hello! for 2 secs blocks to give some information and instructions.

Add the following code new code to the Earth sprite underneath the go to x: 0 y: 0 block.

when green flag clicked hide variable [amount v] hide variable [earth v] set [earth v] to (40075) go to x (0) y (0) // add new code under here say (join [The circumference of the earth is ] (join (earth) [ kilometers])) for (5) seconds say [Choose how you want to go around the world by clicking on an option below.] for (5) seconds


Join our club 😃

To view the remaining 5 steps and access hundreds of other coding projects please login or create an account.

Copyright Notice
This lesson is copyright of . Unauthorised use, copying or distribution is not allowed.

Scratch is developed by the Lifelong Kindergarten Group at the MIT Media Lab. It is available for free at https://scratch.mit.edu
🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more