CSCI 1105 Lecture Notes - Lecture 25: Venn Diagram, Global Variable

90 views2 pages
Verified Note

Document Summary

Summary chapter 5 (10 questions on the exam about this) A function is a named sequence of instructions. Arguments are supplied when functions are called. Return value is the result that the function computes. When declaring a function, provide a name for the function and a variable for each argument. Comments in a function explain the purpose of a function, the meaning of parameters and return value, as well as any special requirements. Parameter variables hold the arguments supplied in the function call. The return statement terminates a function call and yields the function result: you don"t need any return statements in a python function. Complete computations can be reused in functions. Use the process of stepwise refinement to decompose complex tasks into simpler ones. When you discover that you need a function, write a description of the parameter variables and return values. A function may require simpler functions to carry out its work.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents