CSE 131 Module 6: Recursion

Exercises

These exercises are part of the asynchronous component of this course. Material is taught and demonstrated, but at times you are asked to complete one of the exercises to help you master the new concepts.

In the repository you are using for this course, look inside the exercises source folder, and you will see assignments organized by name. Before continuing on to the next portion of the asynchronous material, spend some time on the exercise. When you are finished, commit your code so that credit for the exercise can be given.

It is not so important that you get the exercise exactly right. It is important to work through it as best you can before you look at the solution or continue with other work in this module.


Before starting this exercise:
Be sure to update your repository before beginning this assignment, so that you receive any code you need.

Recursive sum

Instructions

After completing this exercise:
Commit and push any files you have changed so that you receive credit for your work!

Before starting this exercise:
Be sure to update your repository before beginning this assignment, so that you receive any code you need.

Recursive addition

Instructions

After completing this exercise:
Commit and push any files you have changed so that you receive credit for your work!

Before starting this exercise:
Be sure to update your repository before beginning this assignment, so that you receive any code you need.

Base Cases

Part 1
In the video, one possible explanation for human reproduction was given, namely that a woman is born with all of the babies already inside her that she would ever deliver. This idea is attributed to Anton von Leeuwenhoek who, as a lensmaker, greatly advanced the use of microscopes in studying biology. In terms of recursion and base cases, what is wrong with von Leeuwenhoek's speculation?
Part 2

Instructions

After completing this exercise:
Commit and push any files you have changed so that you receive credit for your work!

Before starting this exercise:
Be sure to update your repository before beginning this assignment, so that you receive any code you need.

Graph Paper

Instructions

After completing this exercise:
Commit and push any files you have changed so that you receive credit for your work!