Tutorvo

Functions: Parameters & Return Values, a Call Log and Functions With and Without Side Effects

Lesson 6 of 815 minLab

This lesson is part of the course

In this lesson

You evaluate a function for a table of calls, keep a running total of its return values, and trace a main program in which a procedure with a side effect changes the result of a later call.

Buy the course once for $9.99 to unlock every lesson and lab, the final exam and the certificate – lifetime access, no subscription.

Lessons in this course

  1. Variables & Assignment: One Executed Line per Row, a Column per Variable and the Swap with a TemporaryLab15 min Locked
  2. Conditions: If / Else-If Chains as IFS, AND/OR/NOT and a Test Table that Reaches Every BranchLab15 min Locked
  3. Counting Loops: a For-Loop Row by Row, Accumulators, Running Totals and Nested LoopsLab15 min Locked
  4. While Loops & Termination: Digit Sums with INT and MOD, Halving to a Limit, a Toy 3n + 1 Sequence and an Iteration GuardLab15 min Locked
  5. Arrays & Strings: 0-Based vs 1-Based Positions, the Running Maximum, Counting Matches and Reversing a WordLab15 min Locked
  6. Functions: Parameters & Return Values, a Call Log and Functions With and Without Side EffectsLab15 min Locked
  7. Recursion: a Call-Stack Table Going Down and Coming Back Up, the Same Task as a Loop and Stack DepthLab15 min Locked
  8. Capstone – Debugging: < vs <= in Loop Bounds, Wrong Start Values, Buggy vs Fixed Traces, a Test Table and a Bug ChartLab18 min Locked