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.
Create a new Scratch project and delete the cat sprite.
Go to the Scratch website using the link below and click on the 'Create' link in the blue bar at the top.
By default, each new project starts with the cat sprite already added. To delete the cat click on the x in the blue circle beside the cat in the sprite list.
Add the 'Stars' backdrop to your project from the backdrop library.
To add a backdrop from the backdrop library follow these steps:
You can use search box or the filter links (Fantasy, Music, Sports etc) to locate your backdrop.
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:
To help us with these formulas we will need two variables. Create two new variables by clicking the 'Make a Variable' button.
In the Variables palette, create a new variable by clicking the 'Make a Variable' button.
Once you click this button a box will appear asking what you want to call your variable. Give it a name that reminds you what you will be using it for. For example, if you wanted to keep track of your score in a game, you would create a variable called 'score'.
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
To add a sprite from the sprite library follow these steps:
You can use search box or the filter links (Animals, People, Fantasy etc) to locate your sprite.
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