Win IT Exam with Last Dumps 2024


Python PCAP Exam

Page 12/15
Viewing Questions 111 120 out of 146 Questions
80.00%

Question 111
Assuming that the following code has been executed successfully, which of the expressions evaluate to True? (Choose two.)
Image PCAP_111Q.png related to the Python PCAP Exam
A. b() == 4
B. a != b
C. a is not None
D. a() == 4

Question 112
What is the expected output of the following code?
Image PCAP_112Q.png related to the Python PCAP Exam
A. 3
B. 5
C. 4
D. an exception is raised

Question 113
Which of the following lambda definitions are correct? (Choose two.)
A. lambda x,y: (x,y)
B. lambda x,y: return x//y - x%y
C. lambda x,y: x//y - x%y
D. lambda x,y = x//y - x%y

Question 114
Which of the following statements are true? (Choose two.)
A. if invoking open () fails, an exception is raised
B. open () requires a second argument
C. open () is a function which returns an object that represents a physical file
D. instd, outstd. errstd are the names of pre-opened streams

Question 115
What is the expected behavior of the following code?
Image PCAP_115Q.png related to the Python PCAP Exam
A. the code is erroneous and it will not execute
B. it outputs 1
C. it outputs -1
D. it outputs 0


Question 116
Which of the following snippets will execute without raising any unhandled exceptions? (Choose two.)
A.
Image PCAP_116QA.png related to the Python PCAP Exam
B.
Image PCAP_116QB.png related to the Python PCAP Exam
C.
Image PCAP_116QC.png related to the Python PCAP Exam
D.
Image PCAP_116QD.png related to the Python PCAP Exam

Question 117
Which of the following expressions evaluate to True? (Choose two.)
A. '8'+'8'!=2*'8'
B. 'xYz'.lower()>'XY'
C. float('3.14')==str('3.' + '14')
D. 121+1==int('1' + 2 * '2')

Question 118
What is the expected behavior of the following code?
Image PCAP_118Q.png related to the Python PCAP Exam
A. it raises an exception
B. it outputs 3
C. it outputs 1
D. it outputs 6

Question 119
What is the expected behavior of the following code?
Image PCAP_119Q.png related to the Python PCAP Exam
A. the code is erroneous and it will not execute
B. it outputs 2.0
C. it outputs 2.5
D. it outputs 3.0

Question 120
What is the expected behavior of the following code?
Image PCAP_120Q.png related to the Python PCAP Exam
A. it outputs [4, 2]
B. it outputs [2, 4]
C. it outputs [0, 1, 2, 3, 4]
D. the code is erroneous and it will not execute