So something like this:
# head makeRectangle(0, 0, "red", 80, 50) # eyes makeRectangle(25, -10, "white", 30, 10) makeRectangle(30, -15, "black", 5, 5) makeRectangle(40, -15, "black", 5, 5) # mouth makeRectangle(20, -35, "black", 30, 5)
ABOVE TRANSFORMS INTO:
def makeHead(x, y, color): # head makeRectangle(x, y, color, 80, 50) # eyes makeRectangle(x+25, y-10, "white", 30, 10) makeRectangle(x+30, y-15, "black", 5, 5) makeRectangle(x+40, y-15, "black", 5, 5) # mouth makeRectangle(x+20, y-35, "black", 30, 5) makeHead(200, 200, "red") makeHead(-200, -200, "yellow")
You can reach me at ddjapri@ayclogic.com for any questions.
Class notes: https://drive.google.com/drive/folders/1JIaswYI_MssVSv7icxgYPd_LblYQvOVO?usp=sharing