To draw an octagon in MSWLogo, you can use the following commands. First, set the angle for turning by typing SETHEADING 0 to face up. Then, use a loop to repeat the process of moving forward and turning: REPEAT 8 [FORWARD 100 RIGHT 45]. This command moves the turtle forward by 100 units and turns it right by 45 degrees, completing the octagon shape.
Copyright © 2026 eLLeNow.com All Rights Reserved.