Win IT Exam with Last Dumps 2024


Python PCAP Exam

Page 7/15
Viewing Questions 61 70 out of 146 Questions
46.67%

Question 61
What can you deduce from the line below? (Choose two.)
Image PCAP_61Q.png related to the Python PCAP Exam
A. import a.b.c should be placed before that line
B. f () is located in subpackage c of subpackage b of package a
C. the line is incorrect
D. the function being invoked is called a.b.c.f ()

Question 62
A two-parameter lambda function raising its first parameter to the power of the second parameter should be declared as:
A. lambda(x,y)= x**y
B. lambda(x,y):x**y
C. def lambda(x,y): return x ** y
D. lambda x,y:x**y

Question 63
What is the expected output of the following code?
Image PCAP_63Q.png related to the Python PCAP Exam
A. 21
B. 12
C. 3
D. none

Question 64
A method for passing the arguments used by the following snippet is called:
Image PCAP_64Q.png related to the Python PCAP Exam
A. sequential
B. named
C. positional
D. keyword

Question 65
What is the expected behavior of the following code?It will -
Image PCAP_65Q.png related to the Python PCAP Exam
A. print 2 1
B. print 1 2
C. cause a runtime exception
D. print


Question 66
What is the expected output of the following code?
Image PCAP_66Q.png related to the Python PCAP Exam
A. 2
B. The code will cause a runtime exception
C. 1
D. 3

Question 67
What is the expected behavior of the following code?
It will:
Image PCAP_67Q.png related to the Python PCAP Exam
A. print 0
B. cause a runtime exception
C. prints 3
D. print an empty line

Question 68
If any of a class's components has a name that starts with two underscores (___), then:
A. the class component's name will be mangled
B. the class component has to be an instance variable
C. the class component has to be a class variable
D. the class component has to be a method

Question 69
If you need to serve two different exceptions called Ex1 and Ex2 in one except branch, you can write:
A. except Ex1 Ex2:
B. except (ex1,Ex2):
C. except Ex1,Ex2:
D. except Ex1+Ex2:

Question 70
A function called issubclass (c1,c2) is able to check if:
A. c1 and c2 are both subclasses of the same superclass
B. c2 is a subclass of c1
C. c1 is a subclass of c2
D. c1 and c2 are not subclasses of the same superclass