Sort:  

I'm glad you liked it. Yes, it is in fact very basic machine learning algorithm( Linear Regression). It's not necessary to use any library at all, for learning purpose you we can just implement the whole mathematical algorithm(as shown above) all by ourself in python, but why reinvent the wheel, after all we will get the same result at the end.😉