View the step-by-step solution to:

Part 1 Section 6.2 of your textbook describes incremental development . Do the exercise at the end of that section:

Part 1

Section 6.2 of your textbook describes incremental development. Do the exercise at the end of that section:

As an exercise, 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.



Part 3


Describe your experience so far with peer assessment of Discussion Assignments.


  • How do you feel about the feedback and ratings you have received from your peers?
  • How do you think your peers feel about the feedback you provided them? And the ratings you gave them?



Reference: 

Downey, A. (2015). Think Python: How to think like a computer scientist. Needham, Massachusetts: Green Tree Press.

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question