Consider the following example of a LightBot program written out in text. Again, in this case we have named our robot "andy". When would andy jump?


              andy.move()
              andy.turnRight()
              andy.move()
              andy.jump()
            

Jumping will be the FOURTH thing andy does
  • Jumping will be the FIRST thing andy does
  • Jumping will be the SECOND thing andy does
  • Jumping will be the THIRD thing andy does

There are no hints for this question

Consider the following example of a LightBot program written out in text. Again, in this case we have named our robot "andy". When would andy jump?

              f1:
                andy.move()
                andy.turnRight()
                andy.move()

              main:
                run f1()
                run f1()
                andy.jump()
            

Jumping will be the SEVENTH thing andy does
  • Jumping will be the FOURTH thing andy does
  • Jumping will be the SIXTH thing andy does
  • ]
  • Jumping will be the THIRD thing andy does

>The f1 method is run twice. This means andy would move, turn right, and move, then do it all over again

Consider the following example of a LightBot program written out in text. Again, in this case we have named our robot "andy". How many times would andy jump?



              f1:
                andy.move()
                andy.turnRight()
                andy.move()

              f2:
                andy.jump()
                andy.jump()
                andy.jump()

              main:
                run f1()
                run f1()
                andy.jump()
            

One
  • Two
  • Three
  • ]
  • Six

>The f1 method is run twice, but f2 never gets called from the main and thus never runs in this code!