Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USING PYTHON ONLY: 1. Prompt the user to enter in 3 points on a standard Cartesian coordinate plane. You can assume the user will enter

USING PYTHON ONLY:

1. Prompt the user to enter in 3 points on a standard Cartesian coordinate plane. You can assume the user will enter these values as floating point numbers.

2. Compute the distance between each points - you will be computing 3 distance. Use the distance formula to do this.

3. Report the distance to the user of each side, rounded to 2 decimal places.

4. Next, determine if the three points could form a valid triangle. You can assume that the triangle is valid by checking the following:

(a) Side 1 + Side 2 must be longer than Side 3 (b) Side 2 + Side 3 must be longer than Side 1 (c) Side 3 + Side 1 must be longer than Side 2 

5. If the triangle is valid, report whether it is an equilateral, isosceles, or scalene triangle:

Equilateral Triangle: all sides of the triangle have the same length Isosceles Triangle: only two sides of the triangle have the same length Scalene Triangle: all sides of the triangle have different lengths

Hint: when comparing the size of each triangle it may be helpful to compare a rounded or formatted version of the length of each side. Due to floating point inaccuracies, you may run into a where two values are virtually identical but Python will evaluate them to be different (i.e. 0.000000001 != 0.0000000011)

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

Database Processing

Authors: David Kroenke

11th Edition

0132302675, 9780132302678

More Books

Students also viewed these Databases questions