from nxt.motor import PORT_A, PORT_B, PORT_C
from scripts.helpers.robot import Robot, SERVO_UP
from time import sleep

def main():
    robot = Robot(debug=True, verbose=True)

    # Motors
    robot.init_synchronized_motors(PORT_A, PORT_C)
    robot.init_servo(PORT_B)

    robot.set_servo(SERVO_UP)
    sides = 3  # Spoiler alert! It's a square.
    side_length = 10  # In centimeters
    angle = 30

    for _ in range(sides):
        print('Doing the %d side' % _)
        robot.move_forward(dist=side_length, power=75)
        robot.spin(degrees=(360 - angle), power=75)
        sleep(2)

    print('[DONE] Won\'t do anything else.')


if __name__ == '__main__':
    main()

@@ -232,24 +232,26 @@
  PORT_C)%0A   
+ #
  robot.init_
@@ -264,24 +264,26 @@
 PORT_B)%0A%0A   
+ #
  robot.set_s
@@ -309,17 +309,17 @@
 sides = 
-3
+4
   # Spoi
@@ -395,17 +395,17 @@
 angle = 
-3
+9
 0%0A%0A    f

Draw a square