# Monday Feb 28 from random import * # for random and randint functions from turtle import * # for drawing functions def draw_rectangle(width, height): for i in range(2): forward(width) right(90) forward(height) right(90) ############################################################################ # The randint function takes in two values: a minimum and a maximum # it generates a random whole number between the two, inclusive # # The random function generates a random decimal between 0 and 1 # # Both functions give back values so can be used anywhere a number is needed! speed(0) for i in range(200): color(random(), random(), random()) # red, green, blue between 0-1 begin_fill() draw_rectangle(randint(0, 200), randint(0, 200)) end_fill() up() goto(randint(-400, 400), randint(-400, 400)) down() mainloop()