Exam 1: Basic Python Programming
Exam 1: Basic Python Programming51 Questions
Exam 2: An Overview of Collections50 Questions
Exam 3: Searching, Sorting, and Complexity Analysis50 Questions
Exam 4: Arrays and Linked Structures50 Questions
Exam 5: Interfaces, Implementations, and Polymorphism50 Questions
Exam 6: Inheritance and Abstract Classes50 Questions
Exam 7: Stacks50 Questions
Exam 8: Queues50 Questions
Exam 9: Lists50 Questions
Exam 10: Trees50 Questions
Exam 11: Sets and Dictionaries50 Questions
Exam 12: Graphs50 Questions
Select questions type
A list mutator is a method used to modify the contents of a list.
Free
(True/False)
5.0/5
(37)
Correct Answer:
True
The keyword while means the same thing as While in Python.
Free
(True/False)
4.8/5
(40)
Correct Answer:
False
The keywords True and False are floating point values.
Free
(True/False)
4.8/5
(47)
Correct Answer:
False
In Python, a variable containing the value 5 will evaluate as true if used with the and logical operator.
(True/False)
4.9/5
(32)
Strings are mutable objects, which means you can replace their contents.
(True/False)
4.8/5
(38)
Select the answer that should be used to replace the missing code in the following statements. myList = list()
FileObj = open("myfile.dat", "rb")
While True:
Try:
Item = pickle.load(fileObj)
MyList.append(item)
< missing code >
FileObj.close()
Break
Print(myList)
(Multiple Choice)
4.9/5
(42)
To create an end-of-line comment, which symbol do you use to begin the comment?
(Multiple Choice)
4.8/5
(34)
It is good practice to import all names from a module using the * operator.
(True/False)
4.8/5
(37)
With what character does the print function terminate its output by default?
(Multiple Choice)
4.7/5
(42)
What is the output of the following code?
Sum = 0
For value in range(1,4):
If value == 2:
Sum = sum**2
Sum += value
Print(sum)
(Multiple Choice)
4.9/5
(40)
The expression primes = (2, 3, 5, 7, 11) creates a list named primes.
(True/False)
4.9/5
(40)
Indenting code that should be executed when an if statement evaluates as true makes your program easier to read, but the indentation is not necessary.
(True/False)
4.9/5
(39)
In a class definition, what type of method uses the values of the object's instance variables without changing them?
(Multiple Choice)
4.9/5
(39)
Standard functions and Python's library functions check the types of their arguments when the function is called.
(True/False)
4.8/5
(33)
Showing 1 - 20 of 51
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)