INSY 3300 Test 2 Review 2025
Questions and Answers
A function definition has what two parts? - --Answer --• Function header,
and the block.
When a function is executing, what happens when the end of the function's block
is reached? - --Answer --• Jumps back to the part of the program that called
the function, and the program resumes execution.
What is a variable's scope? - --Answer --• A variable's scope is the part of a
program in which the variable may be accessed.
What is an argument? - --Answer --• Any piece of data that is passe4d into a
function when the function is called.
What is a parameter variable? - --Answer --• Is a variable that receives an
argument that is passed into a function
What is a parameter list? - --Answer --• When passing multiple arguments,
it's the parameters within the function.
....COPYRIGHT ©️ 2025 ALL RIGHTS RESERVED...TRUSTED & VERIFIED 1
, What is a value-returning function? - --Answer --• Is a function that returns
a value back to the part of the program that called it.
How does a value-returning function differ from the void functions? - --
Answer --• The difference is that a value returning function returns a value
back to the statement that called it. A simple function does not return a value.
Returning multiple values? - --Answer --• Return first, last First_name,
last_name = get_name()
What is a module? - --Answer --• Is a file that contains python code. Large
programs are easier to debug and maintain when they are divided into modules.
What are the three steps when a file is used? - --Answer --• Open the file,
process the file, close the file
What is the two different ways to access data stored in a file? - --Answer --•
Sequential access, and direct access
What is sequential access file? - --Answer --• You access the data from the
beginning of the file to the end of the file. If you want to view data at the end of
the file you have to read all previous data. (Can't jump to data)
....COPYRIGHT ©️ 2025 ALL RIGHTS RESERVED...TRUSTED & VERIFIED 2
Questions and Answers
A function definition has what two parts? - --Answer --• Function header,
and the block.
When a function is executing, what happens when the end of the function's block
is reached? - --Answer --• Jumps back to the part of the program that called
the function, and the program resumes execution.
What is a variable's scope? - --Answer --• A variable's scope is the part of a
program in which the variable may be accessed.
What is an argument? - --Answer --• Any piece of data that is passe4d into a
function when the function is called.
What is a parameter variable? - --Answer --• Is a variable that receives an
argument that is passed into a function
What is a parameter list? - --Answer --• When passing multiple arguments,
it's the parameters within the function.
....COPYRIGHT ©️ 2025 ALL RIGHTS RESERVED...TRUSTED & VERIFIED 1
, What is a value-returning function? - --Answer --• Is a function that returns
a value back to the part of the program that called it.
How does a value-returning function differ from the void functions? - --
Answer --• The difference is that a value returning function returns a value
back to the statement that called it. A simple function does not return a value.
Returning multiple values? - --Answer --• Return first, last First_name,
last_name = get_name()
What is a module? - --Answer --• Is a file that contains python code. Large
programs are easier to debug and maintain when they are divided into modules.
What are the three steps when a file is used? - --Answer --• Open the file,
process the file, close the file
What is the two different ways to access data stored in a file? - --Answer --•
Sequential access, and direct access
What is sequential access file? - --Answer --• You access the data from the
beginning of the file to the end of the file. If you want to view data at the end of
the file you have to read all previous data. (Can't jump to data)
....COPYRIGHT ©️ 2025 ALL RIGHTS RESERVED...TRUSTED & VERIFIED 2