How do you draw hexagon using repeat command of logo?

1 answer

Answer

1059759

2026-08-18 23:01

+ Follow

To draw a hexagon using the repeat command in Logo, you can use the following code:

<code class="language-logo">repeat 6 [forward 100 right 60]
</code>

This command will move the turtle forward by 100 units and then turn it right by 60 degrees, repeating this process six times to create a hexagon. Adjust the forward distance to change the size of the hexagon.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.