from __future__ import print_function, division
import math
import turtle
bob=turtle.Turtle()
def square(t,length):
print(t)
for i in range(4):
t.fd(length)
t.lt(90)
square(bob,150)
def polygon(t,length,n):
print(t)
for i in range(n):
t.fd(length)
t.lt(360/n)
polygon(bob,50,6)
turtle.mainloop()