Chapter 6 (Functions)

Description

Computer Science Flashcards on Chapter 6 (Functions), created by Andrew Lewis on 14/12/2020.
Andrew Lewis
Flashcards by Andrew Lewis, updated more than 1 year ago
Andrew Lewis
Created by Andrew Lewis over 3 years ago
23
0

Resource summary

Question Answer
This is a prewritten function that is built into a programming language. Library Function
This term describes any mechanism that accepts input, performs some operation that cannot be seen on the input, and produces output. Black Box
This part of a function definition specifies the data type of the value that the function returns, the name of the function, and any parameter variables used by the function to accept arguments. Header
This part of a function definition is comprised of one or more statements that are executed when the function is called. Body
In pseudocode, this statement causes a function to end and sends a value back to the part of the program that called the function. Return
This is a design tool that describes the input, processing, and output of a function. IPO Chart
This type of function returns either "True" or "False". Used to test a condition. Boolean
True/False: "toReal" is an example of a data type conversion function in pseudocode. True
This type of error occurs when you try to assign a value of one data type to a variable of another data type. Type Mismatch Error
This is a string within another string. Substring
A module that returns a value back to the part of the program that called it. Function
What does "IPO" stand for? Input, Processing, and Output
The process of configuring programming languages for a specific country is known as _____. Localization
The process of appending one string to the end of another string is known as _____. Concatenation
_____ means that uppercase characters are distinguished from the lowercase characters. Case-Sensitive
_____ means that the case of the characters within a string is ignored. Case-Insensitive
How does a function differ from a module? A function ends up returning a value back to to where it was called when it finishes, unlike a module which doesn't return any value and just goes back to where it was called.
True/False: When creating a flowchart for a program that has a function, you draw a separate flowchart for each function. True
What does the starting terminal read in a separate flowchart for a function? What does the ending terminal read? The starting terminal usually shows the name of the function, along with any parameters that the function has. The ending terminal reads "Return" followed by the value or expression that is being returned.
True/False: In most programming languages you can pass as many arguments into a function as you need, but you can return only one value from a function. True
True/False: IPO charts provide only brief descriptions of a function's input, processing, and output, as well as the specific steps taken in the function. False: IPO chart don't show the specific steps taken in a function.
True/False: The decision of whether to use an IPO chart, a flowchart, or both is often left to the programmer's personal preference. True
A _____ function is a function that returns either "True" or "False". It is useful for simplifying complex conditions that are tested in decision and repetition structures. Boolean
Most programming languages provide several _____ functions. These functions typically accept one or more values as arguments, perform a mathematical operation using the arguments, and return the result. Mathematical Library
True/False: The code for a library function must appear in a program in order for the program to call the library function. False: Library functions are built into most programming languages which means that they don't require a separate program to be called.
True/False: In many languages it is an error to assign a real number to an integer variable. True
True/False: In some languages you must use a library function to raise a number to a power. True
True/False: Complex mathematical expressions can sometimes be simplified by breaking out part of the expression and putting it in a function. True
Show full summary Hide full summary

Similar

TOEFL English Vocab (A - M)
Ali Kane
Random German A-level Vocab
Libby Shaw
Vocabulary Words
Jenna Trost
TOEFL English Vocabulary (N - Z)
Ali Kane
L'environnement
Bryony Whitehead
TOEFL Vocabulary
aliking
French 1A Vocab
Jade Allatt
10 animals in spanish
Jlaal Mohammed
TOEFL Vocabulary Test
Ali Kane
French 1B Vocab (numbers)
Jade Allatt
French 1D Vocab
Jade Allatt