I’m working on a python multi-part question and need an explanation and answer to help me learn.

Learning Goal: I’m working on a python multi-part question and need an explanation and answer to help me learn.

Part 2. Rectangles and Points (Thinking)

Don’t Use LOOPS

This part of the assignment deals with the use of if statements and proper input.

NO GRAPHICS REQUIRED.

Level 2: Define and assign a rectangle with a point and a length and width.

Use this information to display the coordinates of all four vertices (corners) of the rectangle in the order shown to the right of ABCD. Note that length and width are always values greater than 0.

Again, NO GRAPHICS REQUIRED!!! AB and DC are length, BC and AD are width.

For example: The rectangle has vertices A(3, 5), B(20, 5), C(20, 26) and D(3, 26)

Level 3: Continue from level 2 to prompt the user to input a point (called P) with separate prompts for the x-coordinate and the y-coordinate. Determine if that point P lies on or within the rectangle.

For example:

The rectangle has vertices A(3, 5), B(20, 5), C(20, 26) and D(3, 26)

Please enter the x coordinate of P. 8

Please enter the y coordinate of P. 12

(8, 12) is on or within the rectangle.

Level 3+: Level 3 is modified so that the point is inputted by the user in the form: (x,y).

For example:

The rectangle has vertices A(3, 5), B(20, 5), C(20, 26) and D(3, 26)

Please enter the point in the form (x, y): (8,12)

(8,12) lies on or within the rectangle.

Level 4-: A rectangle can be divided into four equal quadrants, as shown in the diagram to the right. To do this, the midpoints of the sides (F, G, H and I on the diagram) and M (midpoint of the rectangle itself) need to be found.

Continue from level 3+ and display F, G, H, I and M. Please use the diagram as a reference point, so F is the midpoint of AD, etc..

For example:

The rectangle has vertices A(3, 5), B(20, 5), C(20, 26) and D(3, 26)

Please enter the point in the form (x, y): (8,12)

(8,12) lies on or within the rectangle.

F(3, 15.5), G(11.5, 5), H(20, 15.5), I(11.5, 5), M(11.5, 15.5)

Note: One decimal place please.

 

 

Level 4: Continue from level 4- so that if the point is on or inside the rectangle, the program now displays which quadrant it is in. Use the diagram as a guideline for the quadrants..

For example:

The rectangle has vertices A(3, 5), B(20, 5), C(20, 26) and D(3, 26)

Please enter the point in the form (x, y): (8,12)

(8, 12) lies on or within the rectangle.

F(3, 15.5), G(11.5, 5), H(20, 15.5), I(11.5, 5), M(11.5, 15.5)

(8, 12) lies within Quadrant 3.

Level 4+: Your program is to be efficient, make very good use of functions and perform error handling (i.e. handling invalid input with a clear error message).

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
error: Content is protected !!