Question: please in python!! Description of the problem: Points on the Cartesian plane are specifed by x,y pairs, like (x1,y1) and (x2,y2). The distance between two

please in python!!
please in python!! Description of the problem: Points on the Cartesian plane
are specifed by x,y pairs, like (x1,y1) and (x2,y2). The distance between

Description of the problem: Points on the Cartesian plane are specifed by x,y pairs, like (x1,y1) and (x2,y2). The distance between two points is given by the formula. distance=(x1x2)2+(y1y2)2 The points can describe different shapes. Given 3 points, you can describe a triangle. Yes, there are exceptions which we won't worry about now. The sum of the length of the three sides of the triangle is called the perimeter. area=s(sa)(sb)(sc) Above is a formula for the area of a triangle (ANY triangle). It is called "Heron's formula" (also "Hero's formula"), s is defined as the perimeter divided by 2 (called a semi-perimeter), a,b and c are the lengths of the sides of the triangle. Your job is to allow the user to enter the coordinates of the three points and then calculate the perimeter and area of the triangle given by the three points. You can assume the coordinates are integers. (24 points) Part \#1: Test Cases (work these out FIRST!, before class if possible) - Create a multi-line comment at the bottom of your program file which contains the answers that go in the blanks below. It should be the expected output from the program described below, the perimeter and the area with 3 decimal places, given the inputs in the case. Use a calculator as needed. Here Eis a online calculator that you can use. You get 12 points for calculating them, 12 points when your program runs and gives the correct answers. You do NOT want to copy the output of the program here and paste it in! You are doing these BEFORE the program is written! (53 points) Part \#3: Implementation - Write a program that uses Heron's formula and the design in Part \#2 to calculate the perimeter and area of the triangle. - You MUST have a main function definition (def main():) and a call to main (main()) at the bottom. - You must use the sqrt function from the math library. The import statement goes BEFORE the def main0: line. - Put spaces around your operators - makds them MUCH easier to read! Both the assignment operator ) and the math operators. - The design should be interlaced with the code, NOT in the prolog! - Variable names MUST have more than one character. The reason the formula is given with single letters is that mathematicians have to write the formula by hand and the single letters makes it easier. You are typing your identifiers, so you have time to make them a bit longer. Don't use "s", use "semiP". - There are 6 integers input, which represent 3x,y pairs. You should input them in the order given in the test runs below - Show results with 3 decimal places using the format[) method of your string object. Match the sample runs as closely as possible. - Sample Run 1 (one with easy numbers, so it is easy to see it is correct) Triangle Geometry Enter the x and y coordinates for each corner. First Corner x1:0 y1: 0 Second Corner x z: 1 yz: 0 Third Corner 3:0 y3: 1 The perimeter of your triangle is 3.414 The area of your triangle is 0.500

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!