Desmos for sequential programming?

This is just a curiosity.

Using actions and a ticker you can actually create sequential programs in Desmos.
You can simulate commands, if, while, for, etc …
Here’s an example that calculates triangular numbers: Click S_Start

https://www.desmos.com/geometry/g87ax8e7pu

the pseudo-code would be:

n = 0
p = 5
for i=1 to p
   n = n+i
   i = i+1

Did anyone ever use this technique to create something useful or as a teaching example?

It’s a pity that lists of actions are not allowed …

1 Like

My friend and I built some calculators for some number theory tasks in these activities. Screens 33, 47, 51, 57, 58 and 59 present (in Portuguese) solutions to Diophantine equations, linear congruences, simplification of linear congruence, and solution of systems of linear congruences, creating logical operators and flow controls to use the calculator Desmos graphics as a programming language.

Here is the link: Algoritmo da divisão • Activity Builder by Desmos Classroom

1 Like

Wow, this is really a beatiful example and it is really well coded.
That’s exactly the kind of example I was looking for.
I like how you coded the commands, the while loop and also added a halt condition for the ticker.
Thank you for this lovely example.