Assignment if_elif_else_while_D
- start at (0,0)
- end at (0,23)
- use 1 loop
- pick up the 1 flower and use the following while loo
Use this code at the start of your program
tim = Jeroo()
while not ( tim. isWater(AHEAD) and tim.hasFlower() ) :
if tim.isFlower(AHEAD) :
tim.hop()
tim.pick()
elif not tim.isClear(AHEAD) :
tim.turn(RIGHT)
tim.hop()
tim.turn(LEFT)
tim.hop(2)
tim.turn(LEFT)
tim.hop()
tim.turn(RIGHT)
else :
tim.hop()
The map
What the map and Jeroo looks like at the completion of the loop
