IT 117: Intermediate Scripting
Class 24 Ungraded Quiz

  1. What do you call a function that calls itself?


  2. What must a recursive algorithm have in order to work?


  3. What do call the situation where a function calls itself directly?


  4. What do you call the situation where a function calls another function, which then calls the original function?


  5. Can you rewrite any recursive function using a loop instead of recursion?


  6. Which is more efficient, a recursive algorithm or a non-recursive algorithm that does the same thing?


  7. Write a recursive function that counts down from some number. In other words, this function prints it's argument, than all numbers down to 1.


  8. Write a recursive function that calculates the factorial of a number.