PCAP-31-03 Exam Questions
160 real PCAP-31-03 exam questions with expert-verified answers and explanations. Page 1 of 4.
- Question #1
What is true about Python packages? (Select two answers)
- Question #2
A Python module named pymod.py contains a variable named pyvar. Which of the following snippets will let you access the variable?
- Question #3
Assuming that the code below has been executed successfully, which of the following expressions will always evaluate to True? (Select two answers)
- Question #4
With regards to the directory structure below, select the proper forms of the directives in order to import module_A. (Select two answers)
- Question #5
Which one of the platform module functions should be used to determine the underlying platform name?
- Question #6
What is the expected output of the following code?
- Question #7
What is true about the following snippet? (Select two answers)
- Question #8
What is the expected behavior of the following code?
- Question #10
What is the expected behavior of the following code?
- Question #11
What is the expected behavior of the following code?
- Question #12
Which of the following expression evaluate to True? (Select two answers)
- Question #13
What is the expected behavior of the following code?
- Question #14
Which of the following expressions evaluate to True? (Select two answers)
- Question #15
Which of the following expressions evaluate to True? (Select two answers)
- Question #16
Assuming that the snippet below has been executed successfully, which of the following expressions will evaluate to True? string = 'python' [::2] string = string[-1] + string[-2]
- Question #17
Which of the following statements are true? (Select two answers)
- Question #18
What is the expected behavior of the following code?
- Question #19
Assuming that the code below has been placed inside a file named code.py and executed successfully, which of the following expressions evaluate to True?
- Question #20
What is true about Object-Oriented Programming in Python? (Select two answers)
- Question #21
What is the expected behavior of the following code?
- Question #22
Assuming that the following inheritance set is in force, which of the following classes are declared properly? (Select two answers)
- Question #23
What is true about Python class constructors? (Select two answers)
- Question #24
What is the expected behavior of the following code?
- Question #25
A property that stores information about a given class's super-classes is named:
- Question #26
Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Select two answers)
- Question #27
Assuming that the code below has been executed successfully, which of the following expressions evaluate to True? (Select two answers)
- Question #28
What is the expected behavior of the following code?
- Question #29
What is the expected output of the following snippet?
- Question #30
Which of the following lines of code will work flawlessly when put independently inside the add_new () method in order to make the snippet's output equal to [0, 1, 2]? (Select two...
- Question #31
Which of the following statements are true? (Select two answers)
- Question #32
What is the expected behavior of the following code?
- Question #33
What is the expected output of the following code? def foo(x,y,z): return x(y) - x(z) print{f00(lambda x: x % 2, 2, 1) )
- Question #34
Assuming that the following code has been executed successfully, select the expressions which evaluate to True (Select two answers)
- Question #35
What is the expected output of the following code?
- Question #36
What is the expected behavior of the following code?
- Question #37
Which of the following lambda function definitions are correct? (Select two answers)
- Question #38
What is the expected output of the following code if existing_file is the name of a file located inside the working directory?
- Question #39
What is the expected output of the following code if the file named non_zero_length_existing_text_file is a non-zero length file located inside the working directory?
- Question #40
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)
- Question #41
Assuming that the math module has been successfully imported, which of the following expressions evaluate to True? (Select two answers)
- Question #42
What is true about Python packages? (Select two answers)
- Question #43
Assuming that the snippet below has been executed successfully, which of the following expressions evaluate to True? (Choose two.) string = 'SKY'[::-1] string = string[-1]
- Question #44
Which of the following statements are true? (Select two answers)
- Question #45
Which of the following expression evaluate to True? (Select two answers)
- Question #46
If S is a stream open for reading, what do you expect from the following invocation?
- Question #47
Which of the following lines of code will work flawlessly when put independently inside the add_new () method in order to make the snippet's output equal to [0, 1, 1]? (Select two...
- Question #48
What is the expected behavior of the following code?
- Question #49
What is the expected output of the following code if there is no file named non existing_file inside the working directory?
- Question #50
Which of the following statement are true? (Select two answers)
- Question #51
What is the expected output of the following code?