Goal: Fine tune the speed of the car.
Vocabulary: / (division sign)

Notes - Create a slider named speed. Set the minimum to 0 and the maximum to 10.
- Instead of writing fd 1 or fd 2 or fd 5 we can write fd speed and the turtle will move forward the number (of pixels) on the speed slider. But sometimes even a speed of 1 is too fast. How can we slow down the turtle?
When we write
fd speed / 2
we are telling the turtle to divide the number on the slider by 2.
Fd speed / 2 means that if you set the slider to 1, the turtle will move forward 1/2. If you set the slider to 2, it will move forward 2/2 (which is 1). If you set the slider to 10, it will move forward 10 / 2 (which is 5). So fd 5 is the fastest that this turtle will go.
What If?
What happens if you change the numbers on the speed slider?
What happens if you try a maximum of 20 or 50 or 100 instead of 10?
Challenge
What happens if you divide the slider speed by a different number?
|