Skip to main content
CS Teaching Tips

Main navigation

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

Explain through metaphor that return values allow a primary function to get information from a secondary function.

Share Explain through metaphor that return values allow a primary function to get information from a secondary function. with FacebookShare Explain through metaphor that return values allow a primary function to get information from a secondary function. with Twitter
  • More explicitly consider the following conversation metaphor: A primary function may ASK a secondary function a QUESTION by calling it. The secondary function RESPONDS by returning an answer.

More about this tip

Tags

  • Programming Concepts
External Source

Interview with Nick Melnyk

Other Tips By
Other Tips By Nick Melnyk

Similar tips

Have students use lollipop sticks or toothpicks to represent each statement call in an N-ary recursive algorithm.
Misconception: Students incorrectly assume that Java’s substring method is destructive and wrongly anticipate the original string will change.
Misconception: Students believe that in a primitive assignment, x = y could be the equivalent of y = x; they think that the computer science “=” sign is the same as the mathematical “=” sign.
  • CSTT Facebook
  • CSTT Twitter

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

Privacy Policy

  • National Science Foundation
  • Sage Fox Group
  • Harvey Mudd College