You can do that in something like python in 2x less lines.
But I've changed my mind. For math, he'd better take mathlab-octave.
Often, the best tool for the job is the language you feel most comfortable with.
If all you know how to use is a hammer it may be faster on a given task to nail everything together instead of learning other tools. But if you take the time to learn other techniques before you need them, it'll pay off in the long term.