Ive spot the error which might be due to version of python He used reg.predict(3000) while in newer version it work as reg.predict([[3000]))