Questions and CORRECT Answers
A ____________ is a mutable ordered sequence of Python objects . - CORRECT ANSWER-
✔✔list
In Python, a list may contain objects of any type but they must all be of the same type. -
CORRECT ANSWER- ✔✔False
After the del function or remove method are executed on a list, the items following the
eliminated item are ____________. - CORRECT ANSWER- ✔✔moved one position left in
the list
Values used in a Python program that reside in memory are lost when the program terminates.
- CORRECT ANSWER- ✔✔True
Tuples cannot be modified in place. - CORRECT ANSWER- ✔✔True
Which method turns a single string into a list of substrings? - CORRECT ANSWER- ✔✔split
Tuples cannot be sliced. - CORRECT ANSWER- ✔✔False
Lists are mutable. - CORRECT ANSWER- ✔✔True
Which method converts a list of strings into a string value consisting of the elements of the
list concatenated together? - CORRECT ANSWER- ✔✔join
Given the Python statement value = ( 42, "universe", "everything) which statement is illegal
in Python? - CORRECT ANSWER- ✔✔all all illegal
In general, tuples are more efficient than lists. - CORRECT ANSWER- ✔✔True
, Objects that cannot be changed in place are called ____________. - CORRECT ANSWER-
✔✔immutable, static, or unchangable
Which one of the following Python objects can be changed in place? - CORRECT
ANSWER- ✔✔list
In the split method, if no separator is specified, the default is ____________. - CORRECT
ANSWER- ✔✔any whitespace character
A Boolean variable can reference one of two values which are - CORRECT ANSWER-
✔✔True or False
A ________ variable is accessible to all the functions in a program file. - CORRECT
ANSWER- ✔✔global
A ________ variable is created inside a function. - CORRECT ANSWER- ✔✔local
A flowchart is a tool used by programmers to design programs. - CORRECT ANSWER-
✔✔True
A function definition specifies what a function does and causes the function to execute. -
CORRECT ANSWER- ✔✔False
A local variable can be accessed from anywhere in the program. - CORRECT ANSWER-
✔✔False
A set of statements that belong together as a group and contribute to the function definition is
known as a - CORRECT ANSWER- ✔✔block
A value returning function is - CORRECT ANSWER- ✔✔a function that will return a value
back to the part of the program that called it