CS 1110 Lecture 5: 9.8.15 -- Lesson 5 -- Testing and DocStrings

20 views3 pages

Document Summary

9/8/15 -- lesson 5 -- testing and docstrings. Should consist of one line of description and then be followed by a blank line. You should then add more detail about the function. Precondition specifies assumptions we make about the arguments (as in what type it should be). Reminder: a procedure does not have a return statement. If a precondition is true, the function works. If a precondition is false, no guarantees at all. Function is used in ways that violates preconditions. You can however define them using # as single line comments. Bug: error in a program. (always expect them!) Debugging: process of finding bugs and removing them. Testing: process of analyzing, running program, looking for bugs. Test case: a set of input values, together with the expected output. Get in the habit of writing test cases for a function from the function"s specification - even before writing the function"s body.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers