Question: Given a directed line from point p 0 ( x 0 , y 0 ) to p l ( x 1 , y 1 )

Given a directed line from point p0(x0,y0) to pl(x1,y1), you can use the following condition to decide whether a point p2(x2,y2) is on the left side of the line, on the right side of the line, or on the same line (see the below Figure)
(x1-x0)**(y2-y0)-(x2-x0)**(y1-y0){>0p2isontheleftsideoftheline=0p2isonthesameline0p2isontherightsideoftheline
Write a program that prompts the user to enter the x- and y-coordinates for the three points p0,p1, and p2, and displays a message to indicate whether p2 is on the left side, the right side, or on the line from p0 to pl. Display the three points using turtle library, as shown in the below sample runs. Do not inlude def or strp in your code at all because we have not learned it in class.
 Given a directed line from point p0(x0,y0) to pl(x1,y1), you can

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!