Pular para o conteúdo

Lesson 31: Bus stops

English

Count each stop once

  • The robot is a bus. It follows a straight black line, and each red mark across the line is a bus stop.
  • The robot drives 25 mm at a time, so its down eye sees one red mark for 2 or 3 steps.
  • To count each stop once, the program must remember what it saw on the last step.

Words for this lesson

Word Meaning
flag a True/False variable that remembers something
edge the moment a reading changes
count a variable that goes up by 1

Entrar ou criar conta

IGCSE, A-Level & AP