S12 Resource sheet

Look at the program for Level 87 in Blockly and Python. Compare the two languages.

Can you debug the code in Python below, for the same program, to make it work?

from van import Van
my_van = Van()


while not (my_van.at_destination ()):      
      if my_van.is_road('FORWARD')
            my_van.move_forwards()
      elif my_van.is_road( LEFT ):
            my_van.turn_left	  
      else :
            my_van.turn_right()

Last updated