formatting?
说明前后%和后面的参数数量不对应,比如File "
", line 1, in print '%f miles is the same as &f km' % (miles, kilometers)TypeError: not all arguments converted during string formatting后面有miles和kilometer两个参数,前面只有一个%f, 前后不一致; 如果改成print '%f miles is the same as %f km' % (miles, kilometers) 就可以了