blender has a python api and everything you can do in blender can be replicated with scripts. for a start you can draw geometric shapes to show variables and a for loop.
Not just “it has an API”, but it has the most discoverable API I’ve ever seen - if you go into the settings menu and enable “python tooltips”, then hovering over any button or input widget will give you instructions for how to activate or modify the value programatically :D