Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Donald A. Carpenter Fred R. McFadden

1st Edition

8178088045, 978-8178088044

More Books

Students also viewed these Databases questions