# Authors:
# Date: 
# Practicum 2, Problem 3

""" This program multiplies out ("FOILs") a factored polynomial, such as the
following:
    (2x + 2)(3x + 1) = 6x^2 + 8x + 2

In case you need a refresher, this is calculated by summing four products:
First:   2x * 3x = 6x^2
Outside:  2x * 1 = 2x
Inside:   2 * 3x = 6x
Last:      2 * 1 = 2

The program takes four command line arguments:
- The first two are the x coefficient and constant in the first factor
  (2 and 2, in the example above)
- The second two are the x coefficient and constant in the second factor
  (3 and 1, in the example above)

The program outputs the right-hand side of the equation above, which is
calculated by FOILing, i.e., summing the products of the first, inside, outside,
and last pairs of values in the factored polynomial.

Examples:
>>> %Run p3.py 2 2 3 1
6x^2 + 8x + 2
>>> %Run p3.py 1 2 0 3
0x^2 + 3x + 6
>>> %Run p3.py 1 4 -3 2
-3x^2 + -10x + 8
"""

