Question: this is for python 3 I need to write a program with a main.py CGI script that can make a list of one-thousand random rectangles

this is for python 3

I need to write a program with a main.py CGI script that can make a list of one-thousand random rectangles and generate the SVG code that will show the rectangles on a webpage. the 3 required files that needs to be made for the main.py is: point.py (must contain 2 coordinates _across and _down. has to have setters and getters for the said coordinates. the constructor will initialize them to both 0.)

color.py (must contain 3 color values from 0 to 255 with the _red, _green, _blue. must contain setter and getters for those properties as well. this should contain a method called SVG() which will output the string rgb(0,0,0) with this it can be used insid a tag

rectangle.py ( this should contain a _upperleft (which is a point object) Contains a _height (which is an integerContains a _width (which is an integer)Contains a _fill (which is a color object) this should also have an svg rectangle string. must have a setter and getter for all the properties as well. the constructor will take the four parameter, thepoint,width, height and fill in that particular order.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!