A return statement causes execution to leave the current function and resume at the point in the code immediately after where the function was called. Return statements in many languages allow a function to specify a return value to be passed back to the code that called the function.[1] This activity introduces return values. This activity will help you understand how to use return values in a program.
Test the program to verify that it works correctly.
Trade places, so that both partners have an opportunity to "drive" the visual programming environment.
Change the environment to display local variables and step through the program one shape at a time.
Working together, create a list of function return values that would be used to follow the input-process-output model and convert Fahrenheit temperature to Celsius.
Identify specific steps which must be followed when creating a program using function return values.
Discuss your activity experience with your classmates. What surprised you? What have you learned that you can apply to your own school or work environment?