Computer Science 1026A/B Chapter Notes - Chapter 5: Stochastic Process, Pseudocode, Local Variable

39 views7 pages
terubarenuka and 39895 others unlocked
COMPSCI 1026A/B Full Course Notes
26
COMPSCI 1026A/B Full Course Notes
Verified Note
26 documents

Document Summary

Function: is a sequence of instructions with a name. Arguments are supplied when a function is called. The return value is the result that the function computes. For example, the round function, contains instructions to round a floating-point value to a specified number of decimal places. The instructions of the round function execute and compute the result. The round function returns its result back to where the function was called and your program resumes execution. When another function calls the round function, it provides inputs , such as the values 6. 8275 and 2 in the call round (6. 8275, 2). These values are called the arguments of the function call. Note that they are not necessarily inputs provided by a human user. They are simply the values for which we want the function to compute a result. The output that the round function computes is called the return value. Functions can receive multiple arguments, but they return only one value.

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