ECS 10 Lecture Notes - Lecture 7: Module File, Function Object

32 views3 pages

Document Summary

Function: a named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not produce a result. Function definition: a statement that creates a new function, specifying its name, parameters, and the statements it contains. Function object: a value created by a function definition. The name of the function is a variable that refers to a function object. Function header: the first line of a function definition. Function body: the sequence of statements inside a function definition. Parameter: a name used inside a function to refer to the value passed as an argument. Function call: a statement that runs a function. It consists of the function name followed by an argument list in parentheses. Argument: a value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function. Return value: the result of a function.

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