Thinking ability can be said to run through the whole process, but it is mostly reflected in the analysis and design stage.
Mathematical ability is the means to solve problems, but it needs a lot of mathematical knowledge to make the code run correctly when writing code.
The small program is not obvious, but you can feel it when you really write something bigger.