Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Students also viewed these Databases questions

Question

How to solve maths problems with examples

Answered: 1 week ago

Question

5. Identify three characteristics of the dialectical approach.

Answered: 1 week ago

Question

6. Explain the strengths of a dialectical approach.

Answered: 1 week ago

Question

4. Explain the strengths and weaknesses of each approach.

Answered: 1 week ago