Question: just explain to me what the program is doing?! (continued) square (100,0,50, 'red' ) square (150,100,200, 'blue') square (200,150,75, 'green') # The square function draws
(continued) square (100,0,50, 'red' ) square (150,100,200, 'blue') square (200,150,75, 'green') \# The square function draws a square. The x and y parameters \# are the coordinates of the lower-left corner. The width \# parameter is the width of each side. The color parameter # is the fill color, as a string. def square ( x,y, width, color): turtle.penup() \# Raise the pen turtle.goto (x,y) Move to the specified location turtle.fillcolor(color) \# Set the fill color turtle.pendown() \#Lower the pen turtle.begin_fil1() \# Start fi1ling for count in range (4) : \# Draw a square turtle. forward (width) turtle. left (90) turtle.end_fill() \# End filling 25 \# CaTl the main function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
