Project 73: Midpoint

Intro Problem: Two friends (Dave and Sarah) want to meet up at a location where they have to walk the same distance.  Dave lives at coordinate (2, 1) and Sarah lives at coordinate (6, -5).  Where should they meet?

In the example above, the midpoint would be the point (4, -2), which is the point where Dave and Sarah should meet.

Project 73:

There are four variables that have been initialized: 

x1 = the x-coordinate of the first point (2 in the example above)

y1 = the y-coordinate of the first point (1 in the example above)

x2 = the x-coordinate of the second point (6 in the example above)

y2 = the y-coordinate of the second point (-5 in the example above)

Task: Correctly assign the values for variables 'x' and 'y' that correspond to the midpoint of the line segment formed by the two input points.  

**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