Want to estimate w and b using loops and functions. Also want to predict new variables. Need simple scratch code to understand the mathematics behind Support Vector Machine.
As already mentioned Python is a great tool. Software is open-source. You can analyze various modules written by others. Official modules in Python are often written in C/C++. It is better to study pure python programs made by our peers.
To learn python, I do recommend the following book. It is the best starter on scientific computing that is out there!
Joakim Sundnes: "Introduction to Scientific Programming with Python", Springer, Simula SpringerBriefs on Computing (2010) ISBN 978-3-030-50355-0 (Open Access https://doi.org/10.1007/978-3-030-50356-7)
There are more advanced books from the same group of authors. I recommend searching through them. Some are open access.