Rocket Launch
We will get a rocket launcher countdown from 10 down to 1 and then display a message ‘Launch’
Add an ‘on button A pressed’ loop
This will be the button which will launch the rocket
Add a ‘i from 0 to 4’ block
Let’s investigate what this does
i is a number that changes. Firstly it is a 0 then a 1, then a 2, then a 3, then a 4
Let’s chance the name from i to be something mre friendly. Let’s called it Number
Let’s show this Number so that we can see it on the microbit
Let’s add in puases of 1 second = 1000ms
Instead of going from 0 to 4 I will make it go from 1 to 5 by adding the number 1 each time
Challenge
1. See if you can make it display the numbers 2 to 62. See if you can make it display the numbers 4 to 83. See if you can make it display the numbers 1 to 94. Now make it go from 9 down to 1
a. HINT you startat 9 and subtract the Number b. Can you make it then say “LAUNCH”
Answers