LOGO Programming 
One of the easiest things to do in logo is use the turtle to draw various polygons. You can notice that in order to draw a closed polygon, the turtle has to walk around the edges, eventually turning through 360 degrees before coming back home. Since the turtle makes N turns for an N-sided polygon, the size of each turn in 360/N degrees.

Triangle (3 sides)
Turtle Turns 120ºREPEAT 3 [FD 100 RT 120]

Square (4 sides)
Turtle Turns 90ºREPEAT 4 [FD 100 RT 90]

Pentagon (5 sides)
Turtle Turns 72ºREPEAT 5 [FD 100 RT 72]

Hexagon (6 sides)
Turtle Turns 60ºREPEAT 6 [FD 100 RT 60]

Septagon (7 sides)
Turtle Turns 51ºREPEAT 7 [FD 100 RT 51]

Octagon (8 sides)
Turtle Turns 45ºREPEAT 8 [FD 100 RT 45]