Misconception: Return is a mystery to students because they may not understand that functions have an entry point and an exit point. This results in mistakes such as assuming Python will return the right thing.
Get students paying attention to types in Python; although type declarations aren’t explicitly required in Python, they still exist and are crucial to understanding how Python manages data.
Model writing code using the following techniques to show students how you think about constructing programs in order to support them in learning to independently think through algorithm development.
Introduce terms like declaration, initialization, and operand that often appear in C++ error messages so that students are prepared to understand and interpret the error messages they come across using C++.
Create a list of the vocabulary terms that come up in error messages for the specific programming language you’re teaching so that students are prepared to understand and interpret the error messages they come across.
Ground the teaching of style and code clarity through the experience of reading unfamiliar code to provide meaningful motivation for students.
Teach students that if they need to explain their code for someone else to understand it, they should think about how to change the code to make it readable.
Demo visualizations of code executing online, using tools like Python Tutor, and on paper before having students practice visualizing code execution in the same way to better learn how code executes.
Have students trace loops with break statements to reinforce the behavior of break because tracing is a powerful and straight-forward exercise.
Keep the Scratch scripting area organized using the clean up button to ensure that there aren’t dangling scripts and to make debugging and understanding scripts easier.