CISC 101 Chapter Notes - Chapter 5: Code Reuse, Global Variable, Boolean Function

34 views12 pages

Document Summary

Benefits of modularizing a program with functions: simpler code, a program"s code tends to be simpler and easier to understand when it is broken down into functions, code reuse, reduce the duplication of code within a program. Indentation in python: each line in a block must be indented, when you indent the lines in a block, make sure each line begins with he same number of spaces. In an editor, there are two ways to indent a line: by pressing the tab key at the beginning of the line, by using the spacebar to insert spaces at the beginning of the line. In python, you can use the input function to cause a program to pause until the user presses the. Parameter variable scope: a parameter variable"s scope is the function in which the parameter is used, all of the statements inside the function can access the parameter variable, but no statement outside the function can access it.

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

Related Questions