Part 1 Use incremental development to write a function called hypotenuse that returns the length of the hypotenuse of a right triangle given the lengths of the other two legs as arguments. Record each stage of the development process as you go. (Downey, 2015) After the final stage of development, print the output of hypotenuse(3, 4) and two other calls to hypotenuse with different arguments. Include all of the following in your Learning Journal: An explanation of each stage of development, including code and any test input and output. The output of hypotenuse(3,4). The output of two additional calls to hypotenuse with different arguments.
Part 1
Use incremental development to write a function called hypotenuse that returns the length of the hypotenuse of a right triangle given the lengths of the other two legs as arguments. Record each stage of the development process as you go. (Downey, 2015)
After the final stage of development, print the output of hypotenuse(3, 4) and two other calls to hypotenuse with different arguments.
Include all of the following in your Learning Journal:
- An explanation of each stage of development, including code and any test input and output.
- The output of hypotenuse(3,4).
- The output of two additional calls to hypotenuse with different arguments.
Part 2
Invent your own function that does some useful computation of your choosing. Do not copy the function from somewhere else. Use incremental development, and record each stage of the development process as you go. Finally, print output that demonstrates that the function works as you intended.
Include all of the following in your Learning Journal:
- An explanation of each stage of development, including code and any test input and output.
- The output of three calls to your function with different arguments.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps