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

Have students implement a simple GeoLocation class in Java that finds the distance between two locations using the Google Maps API to give students an interesting introduction to object-oriented programming.
Misconception: Students have difficulty working with temporary variables in arrays.
Support students until they are proficient with content from the beginning of the course as subsequent content will be all the more difficult to learn without mastery of prior content, particularly in introductory CS courses.

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

Privacy Policy