The best way to learn programming is to build simple projects with what you are learning. Build things like “Fizz Buzz”, tic-tac-toe, blackjack, or loan calculators. Search the internet for programming exercises and complete them. Some are math intensive, but you should be able to find all kinds of exercises.