Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In Python: Problem #1: Valid Triangle Tester .Prompt the user to enter in 3 points on a standard Cartesian coordinate plane. You can assume the
In Python:
Problem #1: Valid Triangle Tester .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. Compute the distance between each points-you will be computing 3 distance values. Use the distance formula to do this: ((x1-x2)2+ (y1-y2)2)0.5 .note that you can raise a value to the 0.5 power to compute the square root, or you can use the sart0 function in the math module - your choice! . Report the distance to the user of each side, rounded to 2 decimal places 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 lf the triangle is valid, report whether it is an equilateral, isosceles, or scalene triangle: o Equilateral Triangle: all sides of the triangle have the same length o Isosceles Triangle: only two sides of the triangle have the same length o 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 != 00)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