I remember once in school we had the task of programming a marquee text in pascal, that is a text that moves from left to right. I also remember that I did not have the slightest clue how to do this. Nowadays I’m still not a good programmer, and wanted to ask you guys how you would do it – without any sort of libraries of course.
I thought of putting any letter in an array value and then for example every second move the array values one position to the right or something. Don’t know if thats a good “algorithm”.
What do you guys think?
For example in python I would do :
You just move the starting letter from left to right (respecting the number of letters that’s why I take the modulo (%)) and you move the rest of the string on the other side.
and you would get :
Hope I understood your problem.