# E-2 MCS 260 Fri 11 July 2014 : second question on second part of midterm
"""
Define a function quadric that evaluates a quadric a x^2 + b x + c.
\newline The input parameters are $x$ and the coefficients a, b, and c.
The default values for the coefficients are zero.
The function returns the value of a x^2 + b x + c.
"""
def quadric(x,a=0,b=0,c=0):
    """
    returns a*x**2 + b*x + c.
    """
    return a*x**2 + b*x + c

print quadric(2, 1, 1, 1) # shows 4 + 2 + 1
