Question: write a function in python that will draw a given number of filled rectangles (using addRectFilled ), of random width and random height (both from
write a function in python that will draw a given number of filled rectangles (using addRectFilled), of random width and random height (both from 1 up to a specified maximum), and of random colour, drawn at random points on an empty black canvas of a given width and height.
The total number of rectangles drawn that are squares must be printed in white on the canvas, positioned near the top, and approximately in the middle. In addition, the total number of rectangles that are 1 pixel in width or in height must also be printed in white, below the previous printed line.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
