def evaluate_poly(poly, x):
    """Compute the polynomial function for a given value x.

    Returns that value.

    Example:
    >>> poly = (0.0, 0.0, 5.0, 9.3, 7.0)    # f(x) = 7x^4 + 9.3x^3 + 5x^2
    >>> x = -13
    >>> printevaluate_poly(poly, x)  # f(-13) = 7(-13)^4 + 9.3(-13)^3 +
    5(-13)^2
    180339.9

    poly: tuple of numbers, length > 0
    x: number
    returns: float
    """
    # polyLength = len(poly)
    # print"You've entered a value which corresponds to the polynomial:"
    # for i in range(len(poly)):
    #     print%fx^%d" % (poly[i],i)
    x = float(x)
    # print"Your x value was %f" % x
    # print"Starting Calcs"
    total = 0.0
    for i in range(len(poly)):
        total += (x ** i) * poly[i]
    return total