PCAP-31-03 Exam Questions
160 real PCAP-31-03 exam questions with expert-verified answers and explanations. Page 3 of 4.
- Question #102
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 shoul...
- Question #104
If you want to transform a string into a list of words, what invocation would you use? (Select two answers) Expected output:
- Question #105
You are going to read 16 bytes from a binary file into a bytearray called data. Which lines would you use? (Select two answers)
- Question #106
Which line can be used instead of the comment to cause the snippet to produce the following expected output? (Select two answers) Expected output: 1 2 3 Code:
- Question #107
Which of the equations are True? (Select two answers)
- Question #108
Files with the suffix .pyc contain:
- Question #109
What can you do if you don't like a long package path like this one?
- Question #110
Is it possible to safely check if a class/object has a certain attribute?
- Question #111
The following class hierarchy is given. What is the expected out of the code?
- Question #112
Python strings can be "glued" together using the operator:
- Question #113
Executing the following snippet will cause the dct:
- Question #114
A two-parameter lambda function raising its first parameter to the power of the second parameter should be declared as:
- Question #115
What is the expected behavior of the following code? It will:
- Question #116
What is true about Python class constructors? (Choose two.)
- Question #117
What is the expected behavior of the following code?
- Question #118
What is the expected behavior of the following code?
- Question #119
What is the expected output of the following code if the file named existing_text_file is a non-zero length text file located inside the working directory?
- Question #120
With regards to the directory structure below, select the proper forms of the directives in order to import module_c. (Select two answers)
- Question #121
What is the expected behavior of the following code?
- Question #123
What is the expected behavior of the following code?
- Question #124
Which of the following statements are true? (Select two answers)
- Question #125
Which of the following expressions evaluate to True? (Select two answers)
- Question #126
Which of the following lines of code will work flawlessly when put independently inside the inc ( ) method in order to make the snippet's output equal to 3? (Select two answers)
- Question #127
What is the expected behavior of the following code?
- Question #128
What is true about Object-Oriented Programming in Python? (Select two answers)
- Question #129
What is true about Python packages? (Select two answers)
- Question #130
What is the expected output of the following snippet?
- Question #131
What is the expected behavior of the following code?
- Question #132
What is the expected behavior of the following code?
- Question #133
Which of the following expressions evaluate to True? (Select two answers)
- Question #134
What is the expected behavior of the following code?
- Question #135
The__bases__property contains:
- Question #136
Assuming that the following code has been executed successfully, select the expressions which evaluate to True (Select two answers.)
- Question #137
Which of the following statements are true? (Select two answers)
- Question #138
Which of the following expressions evaluate to True? (Select two answers)
- Question #139
Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Select two answers)
- Question #140
What is the expected output of the following code?
- Question #141
What is the expected output of the following code?
- Question #142
Which of the following invocations are valid? (Select two answers)
- Question #143
Which of the following expressions evaluate to True? (Select two answers)
- Question #144
What is the expected behavior of the following code?
- Question #145
A keyword (Choose two.)
- Question #146
How many stars (*) does the snippet print?
- Question #148
What is the expected output of the following snippet?
- Question #149
Assuming that 1 - is a four-element list is there any difference between these two statements?
- Question #150
What should you put instead of XXX to print out the module name?
- Question #151
What should you put instead of XXX to print out the module name? Package source directories/folders can be:
- Question #152
What can you deduce from the line below? (Choose two.)
- Question #153
What is the expected output of the following code?
- Question #155
What is the expected behavior of the following code? It will: