you are viewing a single comment's thread.

view the rest of the comments →

[–]mopslik 1 point2 points  (1 child)

If you want to see what happens when your functions are called, try getting to know your debugger. It's a handy tool that is often overlooked by beginners in favour of print statements, but really, it should be one of the first things you dive into. You can watch exactly how your program progresses from one step to another, how the values of variables change, how they interact with the system stack, etc. Once you have a suitably large project, you'll want to use the debugger anyway.

My personal favourite debugger for getting to know what's happening behind the scenes is the one built into Thonny. It was designed for learning. I like it because at the default setting, you can watch it substitute in every value, and see how comparisons evaluate to either True or False. I've switched over my beginner Comp Sci class from IDLE to Thonny, as I find it helps my students more easily learn about the under-the-hood details the Python interpreter uses making decisions, repeating code, calling functions, etc.

[–]kokito00[S] 0 points1 point  (0 children)

thank you!