CS 1301 Chapter Notes - Chapter 6: Unreachable Code, Dead Code, Test Suite

46 views2 pages

Document Summary

Produced results result from abs, pow, int, max, range. Fruitful functions- functions that return values, not none: area- returns area of circle with given radius. Return value- evaluates return expression, and then return it immediately as result (fruit) of this function. Temporary variables- make debugging easier; variable used to store an intermediate value in complex calculation. Dead code (unreachable code)- part of program that can never be executed, often because it is after return statement. None- special return value; returned by functions that do not execute return statement with return argument. Incremental development- deals with increasingly complex programs; helps to avoid long debugging sessions by adding and testing only small amount of code at time. Pyscripter- checks code by running program: 1. Start with working skeleton of program and make small incremental changes: 2. Use temporary variables to refer to intermediate values so that you can easily inspect and check them: 3.

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

Related Documents