So if we're talking me specifically, I've been taking classes like scientific computing, Numerical analysis and numerical LA for the past year and a half, and the first time I took one of these courses was the first time I learnt python (or any programming language) properly. Or somewhat properly.
I can use loops and if-else statements well and make functions relatively easily now, but tbh, not much else. Recursive functions still don't make sense, and I probably wouldn't be able to make very efficient code lol.
I taught myself MATLAB recently as well for a project, and while plotting and basic loops and stuff are okay, I still can't figure out how to make a function, let alone anything properly heavy duty. And I've been trying lol.
And then if you showed me something like C (which I did learn but I've forgotten completely by now), I'd probably code worse than a 12 year old techy kid.
My problem? The math is okay. Translating it into code is somewhat okay. But, I'm not always sure how the coding languages work. Syntax and the language itself is a major issue. That, and I'm not sure I can write concise code. What I write will be very long and usually slow, but it'll work lol. But, if you put me next to a CS/engineering person (in my example, my brother) and explain the math to them, they'll easily be able to come up with much better and much more concise code.
Anyway, yeah, I really don't think just being able to do the math makes it easy to learn to code. Imo, it may be easier to code *once* you learn, but obv you'd have to learn *properly* to be able to code first to compete with anyone who started off with a degree/job in CS or something relevant.