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
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
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