Extend it:
Being able to plan out the order of your instructions into sequences is a really important logical skill that will help you solve problems at any age or in any situation.
For example, a manager of a company needs to be able to plan out each step of a strategy for the future, making as much money as possible, or helping as many people as possible at each stage.
The code below will draw a set of traffic lights. There may be some lines of code that you don’t understand, but you should be able to follow the sequence of instructions and adapt or extend it to do whatever want.
Challenges:
- Adapt the code above to make the traffic light smaller
Run the code and see what it does. Then look for any lines that move the turtle forwards. Try making these numbers smaller.
- Copy and adapt the code above to make three different lights: one for each colour
The first set of lights should be red, the next amber and the last one green.
Be careful to lift up the pen before moving to a different part of the screen.
- Draw posts below each traffic light
You can draw roads and sky too if you really want to.
There’s loads of possible ways of approaching these challenges so they’re not self-marking – just see what you can do.
Use your imagination and creativity alongside your logical thinking skills to see what you can create.
Page 1: Intro
Page 2: The theory: learn what you need to know as fast as possible.
Page 3: Try it: try out and adapt some working python code snippets.
Page 4: Debug it: Learn how to find and fix common mistakes.
Page 5: Extend it: Choose a project idea to use your newfound python skills.
Trackbacks/Pingbacks