Certified Associate in Python Programming Questions and Answers
Which of the following expressions evaluate to True? (Select two answers)
The first parameter of each method:
Python strings can be “glued” together using the operator:
What is the expected behavior of the following code?
It will:
What is the expected behavior of the following code?
The following class definition is given. We want the show () method to invoke the get () method, and then output the value the get () method returns. Which of the invocations should be used instead of XXX?
What can you deduce from the following statement? (Select two answers)
str = open('file.txt', "rt")
Which of the equations are True? (Select two answers)
A Python module named pymod, py contains a function named pyfun ( ).
Which of the following snippets will let you invoke the function? (Select two answers)
If you want to access an exception object's components and store them in an object called e, you have to use the following form of exception statement
Which of the following lambda definitions are correct? (Select two answers)
Is it possible to safely check if a class object has a certain attribute0
What is the expected behavior of the following code?
x = 8 ** (1/3)
y = 2. if x < 2.3 else 3.
print(y)
Which of the following expression evaluate to True? (Select two answers)
Which of the following statements are true? (Select two answers)
What is the expected behavior of the following code?
A compiler is a program designed to (select two answers)
Executing the following snippet
will cause the dct:
The following class hierarchy is given. What is the expected out of the code?
What is the expected behavior of the following code?
You are going to read 16 bytes from a binary file into a bytearray called data. Which lines would you use? (Select two answers)