You are viewing a single comment's thread. Return to all comments →
try:
coefficients = list(map(float , input().strip().split())) x = int(input().strip()) result = 0 degree = len(coefficients) - 1 for i, coeff in enumerate(coefficients): result += coeff * (x ** (degree - i)) print(result)
except ValueError as e: print(f"Input error: {e}")
Seems like cookies are disabled on this browser, please enable them to open this website
Polynomials
You are viewing a single comment's thread. Return to all comments →
try:
except ValueError as e: print(f"Input error: {e}")