Robot Project

Class Robot



Main ()



// Declarations

String Stop

num BotStart

num BotLocation [10]

string Bot = Random[10]

num Numbers[10] (1,2,3,4,5,6,7,8,9,10)

num ReverseBackwards[10] (10,9,8,7,6,5,4,3,2,1)



outout Bot


while Bot > 5 then



ReverseBackwards

else

Numbers



endwhile


while BotStart < 5 then



     Output BotLocation + 1



or BotLocation = 5 then



      ReverseBackwords



else

       BotLocation = 10 then

      

       Stop



endwhile


while BotStart >= 9 then



 if BotLocation = 10 then



       stop



 or BotLocation = 8 then



       stop



 else



   Output BotLocation = Botstart + 1



 endif



endwhile



Output ReverseBotLocation()



 Return



num ReverseBotLocation()



    //Declarations

    num ReverseBotLocation[10] (10,9,8,7,6,5,4,3,2,1)



 Return ReverseBotLocation



endClass

Most Popular Blog Posts!