'''
Created on Sep 14, 2017

@author: Susan
'''

import turtle               # allows us to use the turtles library             $
wn = turtle.Screen()        # creates a graphics window                        $
 
def flowerSquare(alex): 
    # This function draws a flower by repeating squares                         
    for i in range(12):      # repeat twelve times                              
        # draw a square                                                         
        alex.forward(50) 
        alex.left(90) 
        alex.forward(50) 
        alex.left(90) 
        alex.forward(50) 
        alex.left(90) 
        alex.forward(50) 
        alex.left(90) 
        # move 30 degrees                                                       
        alex.left(30) 
        
def draw():
    alex = turtle.Turtle()    # create a turtle named alex                      
    flowerSquare(alex)     
 
if __name__ == "__main__": 
    # main function to have a turtle draw a picture                             
    draw() 
     
    wn.exitonclick()   # must be last line in file                              
