How do you draw a triangle using repeat command in logo?

1 answer

Answer

1086425

2026-04-12 17:35

+ Follow

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

<code class="language-logo">REPEAT 3 [FORWARD 100 RIGHT 120]
</code>

This command instructs the turtle to move forward 100 units and then turn right by 120 degrees, repeating this process three times to complete the triangle. Adjust the forward distance as needed for different triangle sizes.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.