Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in python pls Write a program that outputs the equation of the perpendicular bisector of the line segment between two points. Your program should -

in python pls image text in transcribed
Write a program that outputs the equation of the perpendicular bisector of the line segment between two points. Your program should - prompt for and input the coordinates of two points ffor example (2.0,4.0) and (7.0,2.0) : - compute the slope of the line between those two points; - compute the coordinntes of the milpoint of the line segment between the two points by averaging the fwo x coordinates and the two y coordinates; - compute the slope of the perpendicular bisector by taking the negative reciprocal of the slope of the line segment; - compute the y intercept of the perpendicutar bisector fyou now have the slope m of the bisector and a point ( xmid, ymid) on the bisectoc, so the y intercept is ymid - m'xmid) and - output the midpoint coordinates and the equation of the bisector as shown bolow. The figure above lliustrates the sample line segment mentioned above and its perpendicular bisector. Note: You need to consider the spocial cases where the perpendicular bisector is vertical or horizontal as shown in the sample runs 2 and 3. Sample run 1 Enter x coordinate of point1: 2 Enter y coordinate of point 1: 4 Enter x coordinate of point2: 7 Enter y coordinate of point2:-2

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

1. Explain the 2nd world war. 2. Who is the father of history?

Answered: 1 week ago