Exam 8: Modules and Functions
Exam 1: The Craft of Programming50 Questions
Exam 2: The Javascript Language49 Questions
Exam 3: Objects, Events, and Graphical User Interfaces48 Questions
Exam 4: The Sequence Structure50 Questions
Exam 5: The Selection Structure50 Questions
Exam 6: The Repetition Structure50 Questions
Exam 7: Complex Conditions49 Questions
Exam 8: Modules and Functions50 Questions
Exam 9: Menus and Data Validation50 Questions
Exam 10: Arrays50 Questions
Exam 11: Building Programs50 Questions
Exam 12: Sorting Data30 Questions
Exam 13: Recursion50 Questions
Select questions type
Sending the value of a variable or constant to a module, where a local variable is initialized to the argument's value is known as ____.
(Multiple Choice)
5.0/5
(36)
Programmers can work on separate modules for efficiency without having to worry about variable names used in other modules.
(True/False)
4.8/5
(36)
When output is meant for the screen, you should use the ____ keyword.
(Multiple Choice)
4.9/5
(37)
Parameters and arguments must match in number, data type, and order.
(True/False)
4.9/5
(45)
When you call a module by using an argument, you are sending data to the module.
(True/False)
4.9/5
(36)
The following function has ____.
Function Numeric average()
// Declare variables
Declare Numeric inputNum // number entered
Declare Numeric quantity // numbers input
Declare Numeric total = 0 // accumulated total
Declare Numeric index // loop variable
Declare Numeric avg // avg of numbers
// Ask user how many numbers to input
Display "How many numbers will you input? "
Input quantity
// Ask user how many numbers to input
Display "How many numbers will you input? "
Input quantity
// Compute and return average, end function
Avg = total / quantity
Return avg
End Function
(Multiple Choice)
4.8/5
(43)
With a ____ error, the syntax is correct so the computer can process the instruction, but it is not the correct instruction.
(Multiple Choice)
4.8/5
(46)
If two variables in different modules happen to have the same name, they are stored in different memory locations, and the statements affecting one do not affect the other.
(True/False)
4.9/5
(40)
Instead of listing all the code in the main program, your main program calls the ____.
(Multiple Choice)
4.9/5
(41)
In general, variables are assumed to be global unless they are declared as local.
(True/False)
4.8/5
(34)
Clumsy programming involves code that repeats throughout a program, long modules without any apparent organization, and use of the infamous GOTO statement.
(True/False)
4.9/5
(42)
A(n) ____ is simply a section of a program that performs a specific task.
(Multiple Choice)
4.8/5
(31)
In the code below, why is it that the displayName() module cannot print the person's name?
Start
Call getInput()
Call displayName()
Stop
Module getInput()
Declare String name
Display "Enter your name: "
Input name
End Module
Module displayName()
Display "Your name is: " + name
End Module
(Multiple Choice)
4.8/5
(33)
Functions return values by sending data back to the calling module.
(True/False)
4.8/5
(43)
A parameter consists of the data type and variable pair to receive the data.
(True/False)
4.7/5
(52)
You should design your modules and functions to be capable of being used in more than one way.
(True/False)
5.0/5
(33)
____ are values represented as constants or variables, which are enclosed in the parentheses following the module name in the Call statement.
(Multiple Choice)
4.7/5
(46)
Showing 21 - 40 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)