This. Mathetmatical functions never reqlly clicked until after I started learning coding. It helps that the approach I've used is very functional-type programming
The other advantage is that in programing you introduce functions with some hand-waving and "black boxes".
I told my children this is something you put data in , it does some magic, and your get some data out. I started with some built-in functions (or functions I wrote and hide) so that they understand the mechanics.
Then they finally asked "can I do my own function?" and, bam, there we were :)
Removing the ceremonial of mathematical correctness helped a lot.
This is also the reason I am sad we do not give children half- (or 3/4-) lies: we tell them something more or less correct so that they can play with it (making sure they do not stumble upon edge cases) and then refine their knowledge.
This is what my math prof on my 3rd year of physics did: he said "I will give you a neat trick I will not explain because it will be super useful to you now. Next year, when you understand it, it won't be of any practical use anymore". I was not traumatized.
I told my children this is something you put data in , it does some magic, and your get some data out. I started with some built-in functions (or functions I wrote and hide) so that they understand the mechanics.
Then they finally asked "can I do my own function?" and, bam, there we were :)
Removing the ceremonial of mathematical correctness helped a lot.
This is also the reason I am sad we do not give children half- (or 3/4-) lies: we tell them something more or less correct so that they can play with it (making sure they do not stumble upon edge cases) and then refine their knowledge.
This is what my math prof on my 3rd year of physics did: he said "I will give you a neat trick I will not explain because it will be super useful to you now. Next year, when you understand it, it won't be of any practical use anymore". I was not traumatized.