python求幂时报错can't multiply sequence by non-int of type 'float'

试图计算一个含参多项式的结果。
这样会报错:

list1 = input().split()
x, a, b, c, d = float(list1[0]), float(list1[1]), float(list1[2]), float(list1[3]), float(list1[4])
print('%.7f' % a * x ** 3 + b * x ** 2 + c * x ** 1 + d * x ** 0)

但是先用一个变量存储多项式的值,再print,就不会报错了。为啥?

print('%.7f' % (a * x ** 3 + b * x ** 2 + c * x ** 1 + d * x ** 0))

加个括号,要先计算出值,才可以格式化输出。

img