This video animates the execution of a short Python program that identifies user input as being a palindrome or not. Viewers can see how the computer executes the code step by step and see the contents of the variables change as the computer executes the operations. The key components illustrated are for each loops, string methods, conditionals, and variables.
Another way to visualize code running is https://pythontutor.com (which also has versions for C++, Java, and other programming languages).
Playlist of Visualizations:
- https://www.youtube.com/playlist?list=PLDs5gxU1J5CLKlTjZKLtPau7DFrAnDRHD
Animations made by Kaylee L with Manim Community edition (https://www.manim.community/)
- https://github.com/kjlubick/manim_ace
Narration by James K.
Background music from YouTube Audio Library (https://youtube.com/audiolibrary)
- Yoga Style by Chris Haugen
- Fresh Fallen Snow by Chris Haugen
0:00 Intro: What is a palindrome?
0:31 First execution begins with Taco? Cat!
1:10 For each loop starts at 't'
3:20 Loop reaches '?'
4:44 Loop ends
5:25 Second execution begins with REPAID?
7:35 Loop ends
7:53 Outro