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.
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started