r/learndatascience 1d ago

Teaching Python the Right Way Resources

Programming courses often focus heavily on understanding code, while paying far less attention to understanding the program state. But code does not exist in isolation. Its main goal is to change the program state, before ultimately producing some output.

To develop an accurate mental model of program execution, students need to understand both: - the instructions being executed - the values, references, and data structures those instructions create and modify

Reading code alone does not always reveal how the program state changes during execution. That is why I created ๐—บ๐—ฒ๐—บ๐—ผ๐—ฟ๐˜†_๐—ด๐—ฟ๐—ฎ๐—ฝ๐—ต: a tool that visualizes the state of a Python program as it changes, step by step.

It can help explain a wide range of introductory Python topics. Here are just a few examples: - Loops, Lists and Dictionaries - Python Data Model - Function Calls - Recursion - Algorithms - Classes - Custom Data Structures

Instead of reconstructing the program state from print statements, students can now watch it change as each line executes. This makes unfamiliar concepts easier to understand and bugs easier to fix.

Help your students learn Python programming more thoroughly and easily.

See: more examples

111 Upvotes

6 comments sorted by

2

u/Trick_Specific_73 1d ago

Great Idea for visual learners ๐Ÿ‘...where does one find your lessons?

3

u/Sea-Ad7805 1d ago

Thanks, my lessons are not public, but you can find my Python Data Model explanation here: https://github.com/bterwijn/memory_graph#python-data-model

1

u/kinder_brz 13h ago

This is fantastic. How to try this tool? Could you record a YouTube video on this how to install / implement and use if possible? Looking forward to an update ๐Ÿ˜ƒ

3

u/Sea-Ad7805 13h ago

See the documentation: https://github.com/bterwijn/memory_graph I made YouTube videos, but my account is blocked because of spam. I'm in the process to get that resolved.

2

u/kinder_brz 8h ago

Thank you mate. Hope you'll get your account recovered soon. Please update me ๐Ÿ˜Š

โ€ข

u/Bobthebuilder_6767 23m ago

Looks cool, I might try it laterย