Answer:
RECT_HEIGHT = 50
RECT_WIDTH = 30
rect = Rectangle(50,30)
# random.choice returns a random value from the COLORS
# function will draw a rectangle at x, y
def draw_rect(x, y):
rectangle = Rect(50, 30)
rect.set_position(x, y)
rect.set_color(Color.green)
add(rect)
# Link to the mouse click event
add_mouse_click_handler(draw_rect)
Explanation: Hope this works for you.