Optional Project 21: Finding the Equation of Ellipse given 'a' and the Foci

Example 1:

Example 2:

Optional Project 21: Variables 'fociX1', 'fociY1', 'fociX2', 'fociY2', 'a' have been initialized.  

fociX1 is the x-coordinate of the first foci (1 for the first example, -2.46 for the second example)

fociY1 is the y-coordinate of the first foci (-5.46 for the first example, 1 for the second example)

fociX2 is the x-coordinate of the second foci (1 for the first example, 4.46 for the second example)

fociY2 is the y-coordinate of the second foci (1.46 for the first example, 1 for the second example)

a is the "horizontal radius" of the ellipse (2 for the first example and 4 for the second example)

Task: Appropriately initialize the values of 'b', 'h', 'k'.  

b is the "vertical radius" of the ellipse (4 in the first example and 2 in the second example)

(h, k) is the center of the ellipse.

Note: foci1 should either be below (smaller y-coordinate) or the left (smaller x-coordinate) of foci2.  This is shown in the examples above.

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