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

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!