Programming Final Exam Questions and
Answers 100% Solved
A ____________ is a mutable ordered sequence of Python objects . -
✔✔list
In Python, a list may contain objects of any type but they must all be of the
same type. - ✔✔False
After the del function or remove method are executed on a list, the items
following the eliminated item are ____________. - ✔✔moved one position
left in the list
Values used in a Python program that reside in memory are lost when the
program terminates. - ✔✔True
Tuples cannot be modified in place. - ✔✔True
Which method turns a single string into a list of substrings? - ✔✔split
Tuples cannot be sliced. - ✔✔False
Lists are mutable. - ✔✔True
,©JOSHCLAY 2024/2025. YEAR PUBLISHED 2024.
Which method converts a list of strings into a string value consisting of the
elements of the list concatenated together? - ✔✔join
Given the Python statement value = ( 42, "universe", "everything) which
statement is illegal in Python? - ✔✔all all illegal
In general, tuples are more efficient than lists. - ✔✔True
Objects that cannot be changed in place are called ____________. -
✔✔immutable, static, or unchangable
Which one of the following Python objects can be changed in place? -
✔✔list
In the split method, if no separator is specified, the default is
____________. - ✔✔any whitespace character
A Boolean variable can reference one of two values which are - ✔✔True or
False
A ________ variable is accessible to all the functions in a program file. -
✔✔global
A ________ variable is created inside a function. - ✔✔local
A flowchart is a tool used by programmers to design programs. - ✔✔True
, ©JOSHCLAY 2024/2025. YEAR PUBLISHED 2024.
A function definition specifies what a function does and causes the function
to execute. - ✔✔False
A local variable can be accessed from anywhere in the program. - ✔✔False
A set of statements that belong together as a group and contribute to the
function definition is known as a - ✔✔block
A value returning function is - ✔✔a function that will return a value back to
the part of the program that called it
A value returning function is like a simple function except that when it
finishes it returns a value back to the part of the program that called it. -
✔✔True
A(n) ________ character is a special character that is preceded with a
backslash ( \), appearing inside a string literal. - ✔✔escape
A(n) ________ is a name that represents a value stored in the computer's
memory. - ✔✔variable
A(n) ________ is a variable that receives an argument that is passed into a
function. - ✔✔parameter
A(n) ________ is an object that holds multiple items of data. - ✔✔sequence