Well that is because you ask a calculator to divide numbers. Which is a question that can be interpreted in only one way. And done only one way.
Ask the smallest possible for loop and if loop that AI can generate now you have the pocket calculator equivalent of programming.