Win IT Exam with Last Dumps 2024


Python PCAP Exam

Page 1/15
Viewing Questions 1 10 out of 146 Questions
6.67%

Question 1
What will be the value of the i variable when the while e loop finishes its execution?
Image PCAP_1Q.png related to the Python PCAP Exam
A. 1
B. 0
C. 2
D. the variable becomes unavailable

Question 2
And operator able to perform bitwise shifts is coded as (Choose two.)
A. --
B. ++
C. <<
D. >>

Question 3
What would you used instead of XXX if you want to check weather a certain 'key' exists in a dictionary called dict? (Select two answers)) if XXX: print ("Key exists")
A. 'key' in dict
B. dict ['key'] != None
C. dict.exists ('key')
D. 'key' in dict.keys ( )

Question 4
What will the value of the i variable be when the following loop finishes its execution?
Image PCAP_4Q.jpg related to the Python PCAP Exam
A. 10
B. the variable becomes unavailable
C. 11
D. 9

Question 5
The following expression (1+-2) is:
A. equal to 1
B. invalid
C. equal to 2
D. equal to -1


Question 6
A compiler is a program designed to (Choose two.)
A. rearrange the source code to make it clearer
B. check the source code in order to see of it's correct
C. execute the source code
D. translate the source code into machine code

Question 7
If you need a function that does nothing, what would you use instead of XXX? (Select two answers)
def idler( ):
XXX -
A. pass
B. return
C. exit
D. None

Question 8
What is the output of the following piece of code?
Image PCAP_8Q.png related to the Python PCAP Exam
A. ant' bat' camel
B. ant"bat"camel
C. antbatcamel
D. print (a, b, c, sep= '"')

Question 9
What is the expected output of the following snippet?
Image PCAP_9Q.jpg related to the Python PCAP Exam
A. the code is erroneous
B. 3
C. 7
D. 15

Question 10
How many lines does the following snippet output?
Image PCAP_10Q.png related to the Python PCAP Exam
A. three
B. one
C. two
D. four