# Lab 5 - Exercise 2 - Problem (Exploration Exercise) 5 # # Let’s modify our function such that it now takes a parameter, i.e., a colour. # And as above, let’s call this function 3 times to create the shapes below, # each with its particular colour. # # Anne Lavergne # March 2017 import turtle as t def square( colour ): t.pencolor(colour) for each in range(4): t.forward(50) t.right(90) return # MAIN part of program - Top Level t.setup(width=600, height=500) t.pensize(3) t.penup() t.goto(-75,40) t.pendown() # Square 1 square('#f44292') t.penup() t.forward(90) t.pendown() # Square 2 square('#607c51') t.penup() t.forward(90) t.pendown() # Square 3 square('#bae2dc')