Win IT Exam with Last Dumps 2024


Python PCAP Exam

Page 10/15
Viewing Questions 91 100 out of 146 Questions
66.67%

Question 91
Which of the following expressions evaluate to True? (Choose two.)
A. str(1-1)in'123456789'[:2]
B. 'dcb' not in 'abcde'[::-1]
C. 'phd' in 'aplpha'
D. 'True' not in 'False'

Question 92
What is the expected behavior of the following code?
Image PCAP_92Q.png related to the Python PCAP Exam
A. it raises an exception
B. it outputs True
C. it outputs False
D. it outputs nothing

Question 93
Which of the following expressions evaluate to True? (Choose two.)
A. 121+1!='1'+2*'2'
B. '1'+'1'+'1'<'1'*3'
C. 'AbC'.lower()<'AB'
D. '3.14'!=str(3.1415)

Question 94
Assuming that the snippet below has been executed successfully, which of the following expressions evaluate to True? (Choose two.) string = 'python'[::2] string = string[-1]+ string[-2]
A. string[0]=='o'
B. string is None
C. len(string)==3
D. string[0]==string [-1]

Question 95
What is the expected behavior of the following code?
Image PCAP_95Q.png related to the Python PCAP Exam
A. it outputs 0
B. it outputs 1
C. it raises an exception
D. it outputs 2


Question 96
Assuming that the following inheritance set is in force, which of the following classes are declared properly? (Choose two.)
Image PCAP_96Q.png related to the Python PCAP Exam
A. class Class_4(D,A): pass
B. class Class_3(A,C): pass
C. class Class_2(B,D): pass
D. class Class_1(C,D): pass

Question 97
What is the expected output of the following snippet?
Image PCAP_97Q.png related to the Python PCAP Exam
A. True upper
B. True lower
C. False upper
D. False lower

Question 98
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?
Image PCAP_98Q.png related to the Python PCAP Exam
A. len(ClassB.__bases__) ==2
B. ClassA.__module__ == '__main__'
C. __name__ == 'code.py'
D. str(Object) == 'Object'

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

Question 100
What is the expected behavior of the following code?
Image PCAP_100Q.png related to the Python PCAP Exam
A. it outputs 0
B. it raises an exception
C. it outputs 1
D. it outputs 2