Skip to main content
CS Teaching Tips

Main navigation

  • Browse All Tips
  • Tags
  • 3D
  • About
  • Rate Tips
  • Tip Sheets

Misconception: Students think that when they create a new variable within a function, that function will automatically return that variable’s value when executed.

  • For example, students think that by assigning result = 2 in a function, the function will return 2.

More about this tip

Tags

  • Content Misconceptions
  • CS 1
  • Intro Programming
External Source

"Exploring programming misconceptions: an analysis of student mistakes in visual program simulation exercises" by Teemu Sirkiä and Juha Sorva.

Other Tips By
Other Tips By Juha Sorva
Juha Sorva

Similar tips

Demonstrate swapping variables' values by swapping the contents of two cups full of liquid; you need a third cup to swap the liquids just like you need a third, temporary, variable to swap the values.
Encourage students to be careful when using sound blocks in Scratch that don’t have durations, as these blocks start sounds immediately rather than waiting until the first sound is done.
Have students create polygons in Scratch to help them practice debugging and reasoning about geometry.

For more information or to report a bug, contact us at admin@csteachingtips.org. Built with Bootstrap. Powered by Drupal.

Privacy Policy