Project 3 - Parallel Lines

Intro Problem: Two roads are parallel to each other on a long stretch of land in Arizona.

With the center of Arizona as coordinates (0, 0), the equation of the first road is y = -.5x + 4.5

The second road passes through Tuscon, which is at coordinate (8, 1/2).

What is the equation of the second road?

Parallel Lines have the same slope.

Suppose we want to find the equation of the line that is parallel to the lines above that passes through the point (4, -2).  Estimate in your mind where this would cross the y-axis.

The slope of the parallel line would be -1/2.  If the line passes through the point (4, -2) we can substitute x = 4 and y = -2 into the equation y = mx + b, to solve for b.

-2 = -1/2(4) + b

-2 = -2 + b

b = 0  (is this about what you expected the y-intercept to be?)

The equation of the line parallel to the lines above that passes through (4, -2) is Y = -.5X


Project 3: Variables 'm', 'b', 'x', and 'y' have been initialized. 

m is the slope of the original line

b is the y-intercept of the original line

(x,y) is the point that our line (the one we are finding the equation of) passes through.

Task: Appropriately assign variables 'mPar' and 'bPar' that represent the slope and y-intercept of our line.

**If your code works for 5 test cases, you can enter your e-mail address

Universal Computational Math Methods:

pow(5,2) returns 25.0

abs(-3.0) returns 3

sqrt(49.0) returns 7.0