Get New 2021 Python Institute exam PCAP-31-03 Dumps Bundle On flat Updated Dumps!
Full PCAP-31-03 Practice Test and 120 unique questions with explanations waiting just for you, get it now!
NEW QUESTION 29
Python strings can be "glued" together using the operator:
- A. &
- B. .
- C. _
- D. +
Answer: D
NEW QUESTION 30
What is the expected output of the following code if there is no file named non existing_file inside the working directory?
- A. 1 3
- B. 1 2 3
- C. 2 2
- D. 2 2 3
Answer: D
NEW QUESTION 31
What is the expected behavior of the following code?
It will
- A. cause a runtime exception
- B. print 1 2
- C. print 2 1
- D. print <generator object f at (some hex digits)>
Answer: B
NEW QUESTION 32
What is the expected output of the following snippet?
- A. True lower
- B. False lower
- C. False upper
- D. True upper
Answer: A
NEW QUESTION 33
What is the expected behavior of the following code?
- A. it outputs [4, 2]
- B. it outputs [0, 1, 2, 3, 4]
- C. it outputs [2, 4]
- D. the code is erroneus and it will not execute
Answer: A
NEW QUESTION 34
Which of the following statement are true? (Select two answers)
- A. the second open ( ) argument describes the open mode and defaults to 'w'
- B. closing an open file is performed by the closefile ( ) function
- C. if open ( ) 's second argument is 'r' the file must exist or open will fail
- D. if open ( )'s second argument is 'w' and the invocation succeeds, the previous file's content is lost
Answer: C,D
NEW QUESTION 35
An operator able to perform bitwise shifts is coded as (select two answers)
- A. ++
- B. >>
- C. - -
- D. <<
Answer: B,D
NEW QUESTION 36
Assuming that the V variable holds an integer value to 2, which of the following operators should be used instead of OPER to make the expression equal to 1?
V OPER 1 -
- A. <<
- B. >>>
- C. >>
- D. <<<
Answer: C
NEW QUESTION 37
What will be the value of the i variable when the while e loop finishes its execution?
- A. 0
- B. 1
- C. the variable becomes unavailable
- D. 2
Answer: A
Explanation:
NEW QUESTION 38
What is the expected behavior of the following code?
- A. it outputs 2
- B. it outputs 1
- C. it raises an exception
- D. it outputs 0
Answer: D
NEW QUESTION 39
A Python module named pymod.py contains a variable named pyvar.
Which of the following snippets will let youaccess the variable? (Select twoanswers)
- A. from pymod import pyvar = 1
- B. import pymod pymod.pyvar = 1
- C. import pyvar from pymod pyvar = 1
- D. from pymod import pyvar pyvar ()
Answer: B,C
NEW QUESTION 40
A class constructor (Select two answers)
- A. can be invoked directly from any of the subclasses
- B. cannot be invoked directly from inside the class
- C. can be invoked directly from any of the superclasses
- D. can return a value
Answer: A,B
NEW QUESTION 41
What is true about the following snippet? (Select two answers)
- A. the code will raise an unhandled exception
- B. thestring it's niceto see youwill be seen
- C. the string what a pity will be seen
- D. the siring I feel fine 'will be seen
Answer: C,D
NEW QUESTION 42
What is true about Python class constructors? (Select two answers)
- A. the constructor can be invoked directly under strictly defined circumstances
- B. super-class constructor is invoked implicitly during constructor execution
- C. the constructor cannot use the default values of the parameters
- D. the constructor's first parameter identifies an object currently being created
Answer: D
NEW QUESTION 43
Assuming that the following code has been executed successfully, selected the expression which evaluate to True (Select two answers)
- A. b ( ) == 4
- B. a is not None
- C. a ( ) == 4
- D. a ! = b
Answer: B,D
NEW QUESTION 44
How many lines does the following snippet output?
- A. one
- B. two
- C. three
- D. four
Answer: C
NEW QUESTION 45
......
[Dec-2021] Pass Python Institute PCAP-31-03 Exam in First Attempt Guaranteed: https://drive.google.com/open?id=14-COJxpQCaKmbQdxfRdeO0f26Tqiv-9I
Reduce Your Chance of Failure in PCAP-31-03 Exam: https://www.testvalid.com/PCAP-31-03-exam-collection.html