CodePlay ?

Home

Unit ยท decisions

Sensor Rover

Programs can decide. A comparison like score >= 5 is either True or False, and if runs a block only when it is True. The rover now has two sensors, front_is_clear() and at_flag(), so one program can handle grids it has never seen.

0 / 7 done

  1. 1 Which medal?๐Ÿ”ฎ Predict
  2. 2 Drive until the wall๐Ÿ‘ฃ Trace
  3. 3 Turn at the edge๐Ÿงฉ Parsons
  4. 4 New ticket prices๐Ÿ”ง Modify
  5. 5 Every grade is C๐Ÿž Debug
  6. 6 Stop on the flagโœ๏ธ Write
  7. 7 Fizz or buzzโœ๏ธ Write