Python TypeError: must be str, not int
问题 I'm using Python 3.6.2 on Windows 64-bit, I have an error: A TypeError.... A = 0 ns = input('Input start:') nf = input('Input finish:') steps = input('Input steps:') for i in range(steps + 1): d_n = (nf-ns)/steps n = ns + i * d_n f_n = n*n A = A + f_n * d_n next print('Area is: ', A) And here's the error.... Traceback (most recent call last): File "C:/Users/UNO/Documents/Python 3.6/Curve_Area2.py", line 5, in <module> for i in range(steps + 1): TypeError: must be str, not int And I want this