Download Traffic light programming Take a look at some

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Structured programming wikipedia , lookup

Transcript
Traffic light programming
Take a look at some traffic lights in action to see the
sequence of the lights. There are four sequences to
spot!
Colour the lights to show the order in which they light
up.
Can you complete the simple program to light the traffic lights?
Write the sequence for the lights
The red light is on for 5 minutes.
Simplify your instructions to create a simple
code
RED ON 300 sec
The red and amber lights are on for 60
seconds.
The sequence repeats.
REPEAT
Programming challenge:
What would happen if we introduced a crossing button, a wait command? How
would you change your program? Hint: try introducing an IF command.
© www.teachitprimary.co.uk 2014
21365
Page 1 of 1