check if there are consecutive numbers in list
I have a list like the following:
and I would like to loop through that list and check if there are consecutive numbers in the list (in above list, there are three consecutive numbers: 3,4 and 5) and, if are, to automatically count how many...
Is this possible with only GeoGebra scripting?
I've created the JS function for that:
in which the returning value of the function (nmbOfSeq) is one less than the total number of consecutive numbers in the sequence because it's increased by one for each pair of consecutive numbers in the sequence...
Now, I'm working with students who are not as skilled in programming so I wonder if there are some commands by which I could come with the same result..?
Thanks in advance for your help,