Write a function to create a movie where one item is moving from the top to the bottom and another item is moving from the bottom to the top.
What will be an ideal response?
```
def movingRectangle3(directory):
for num in range (1 ,30): #29 frames
canvas = makeEmptyPicture (300 ,250)
#add a filled rect moving linearly
addRectFilled(canvas,0,num*7,50,50,red)
addRectFilled(canvas,0 ,200-num*7 ,50,50,blue)
# Now , write out the frame
# Have to deal with single digit vs. double digit
numStr=str(num)
if num < 10:
writePictureTo ( canvas , directory +"//frame0"+ numStr +".jpg")
if num >= 10:
writePictureTo ( canvas , directory +"//frame"+ numStr +".jpg")
movie = makeMovieFromInitialFile(directory+"//frame00.jpg");
return movie
```
You might also like to view...
What additional functionality does an extended regular expression have?
What will be an ideal response?
In the early 1990s, search tools with the names Archie, Gopher, Veronica, and Jughead established the use of ____, which made it possible to click a text link and retrieve a document from another location in the vast Internet resources known as "cyberspace."
A. hyperlinks B. tags C. functions D. objects
Which of the following is the code of acceptable behaviors users should follow while on the Internet; that is, it is the conduct expected of individuals while online?
A. netiquette B. web politesse C. Internet behavior D. web civility
What does the AVERAGE function not ignore?
A. Text B. Empty cells C. Dates D. Cells with N/A