Add new comment

Permalink
Comment

the bot should make logbase2 1000 moves, which is 10 when the ceiling function is used. the robot starts facing north and goes 1000 steps, it then proceeds to go 500 east, 250 south, 125 west, 62.5 north, 31.25 east, 15.625 south, 7.8125 west, 3.90625 north, 1.953125 east. this means that it has gone 1000 - 250+62.5-15.625+3.90625 = 800.78125 north and 500-125+31.25-7.8125+1.953125 = 400.390625 east. this means, via pythag, that the robot has traveled 895.301 to 3dp. he has also gone overall in a direction of 26.57 degrees true.

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.