A red box of size 20 pixels by 20 pixels jumps around the screen using the modules kandinsky, time, and random.
Numworks’ kandinsky does not have a clear screen (as of Version 23), we create a function to “clear” the screen. We can make the screen anything we want but the following code creates the “boring” white screen: def cls(): fill_rect(0,0,320,220,(255,255,255))
Remember the randrange does NOT include the stop value, so if we want to include the stop value, we will need to add it: randrange(start, stop + 1) randrange(start, stop + step, step)