rect rectangle(point( )point( )rect setfill('blue'rect draw(wincir circle(point( , ) cir setfill('yellow'cir draw(wincir circle(point( , ) cir setfill('red'cir draw(winzelle' reference pages do not mention the fact that the order in which these object are first drawn is significant if objects overlapthe ones which used the draw method later appear on top other object methods like setfill or move do not alter which are in front of which this becomes significant when cir moves the moving cir goes over the rectangle and behind cir (run the program again if you missed that the animation starts with the code for simple repeat loopfor in range( )cir move( time sleep animate cir to the right this very simple loop animates cir moving in straight line to the right as in moviethe illusion of continuous motion is given by jumping only short distance each time (increasing the horizontal coordinate by the time sleep functionmentioned earliertakes as parameter time in seconds to have the program sleepor delaybefore continuing with the iteration of the loop this delay is importantbecause modern computers are so fastthat the intermediate motion would be invisible without the delay the delay can be given as decimalto allow the time to be fraction of second the next three lines are almost identical to the previous linesand move the circle to the left (- in the horizontal coordinate each timefor in range( )animate cir to the left cir move(- time sleep the next example programbackandforth pyit just slight variationlooking to the user just like the last version only the small changes are shown below this version was written after noticing how similar the two animation loops aresuggesting an improvement to the programanimating any object to move in straight line is logical abstraction well expressed via function the loop in the initial version of the program contained number of arbitrarily chosen constantswhich make sense to turn into parameters alsothe object to be animated does not need to be cir it can be any of the drawable objects in the graphics package the name shape is used to make this parameterdef moveonline(shapedxdyrepetitionsdelay)for in range(repetitions)shape move(dxdytime sleep(delaythen in the main function the two similar animation loops are reduced to line for each directionmoveonline(cir moveonline(cir - make sure you see these two lines with function calls behave the same way as the two animation loops in the main program of the original version objects and methods