Get New 2021 Python Institute PCAP-31-03 Exam Dumps Bundle On flat Updated Dumps! [Q26-Q48]

Share

Get New 2021 Python Institute exam PCAP-31-03 Dumps Bundle On flat Updated Dumps!

Full PCAP-31-03 Practice Test and 110 unique questions with explanations waiting just for you, get it now!

NEW QUESTION 26
What is the expected output of the following snippet?

  • A. 0
  • B. 1
  • C. the code is erroneous
  • D. 2

Answer: C

 

NEW QUESTION 27
With regards to the directory structure below, select the proper forms of the directives in order to import module_a. (Select two answers)

  • A. import module_a from pypack
  • B. import module_a
  • C. import pypack.module_a
  • D. from pypack import module_a

Answer: C,D

 

NEW QUESTION 28
What will the value of the i variable be when the following loop finishes its execution?

  • A. 0
  • B. 1
  • C. the variable becomes unavailable
  • D. 2

Answer: A

 

NEW QUESTION 29
The following expression
1+-2
is:

  • A. equal to 2
  • B. equal to -1
  • C. equal to 1
  • D. invalid

Answer: B

Explanation:

 

NEW QUESTION 30
What is the expected behavior of the following code?

  • A. it raises an exception
  • B. it outputs 0
  • C. it outputs 'None'
  • D. it outputs 3

Answer: D

 

NEW QUESTION 31
What is the expected output of the following code?

  • A. an exception is raised
  • B. 0
  • C. 1
  • D. 2

Answer: B

 

NEW QUESTION 32
Which of the following snippets will execute without raising any unhandled exceptions? (Select answers) A)

B)

C)

D)

  • A. Option C
  • B. Option B
  • C. Option A
  • D. Option D

Answer: A,B,D

 

NEW QUESTION 33
You are going to read 16 bytes from a binary file into a bytearray called dat a. Which lines would you use? (Select two answers)

  • A. data = bytearray (binfile.read (16))
  • B. data = bytearray (16) bf.readinto (data)
  • C. data = binfile.read (bytearray (16))
  • D. bf. readinto (data = bytearray (16))

Answer: A,B

Explanation:
https://docs.python.org/3/library/functions.html#func-bytearray
https://docs.python.org/3/library/io.html

 

NEW QUESTION 34
What is true about the following snippet? (Select two answers)

  • A. the siring I feel fine 'will be seen
  • B. the string what a pity will be seen
  • C. the code will raise an unhandled exception
  • D. the string it's nice to see you will be seen

Answer: A,B

 

NEW QUESTION 35
What is the expected behavior of the following code?

  • A. the code is erroneous and it will not execute
  • B. it outputs 1
  • C. it outputs 3
  • D. it outputs 2

Answer: B

 

NEW QUESTION 36
A method for passing the arguments used by the following snippet is called:

  • A. positional
  • B. keyword
  • C. named
  • D. sequential

Answer: A

 

NEW QUESTION 37
What is the expected behavior of the following code?

  • A. it raises an exception
  • B. it outputs 'None'
  • C. it outputs 0
  • D. it outputs 3

Answer: C

 

NEW QUESTION 38
Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Select two answers)

  • A. B.VarA == 3
  • B. hasattr(obj_b, 'prop_aa')
  • C. obj_b.prop_a == 3
  • D. isinstance(obj_c,A)

Answer: B,D

 

NEW QUESTION 39
Which of the following invocations are valid? (Select two answers)

  • A. rfind("python","r")
  • B. "python".index("th")
  • C. sorted("python")
  • D. "python".sort ()

Answer: B,C

 

NEW QUESTION 40
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: A

 

NEW QUESTION 41
What is true about Python packages? (Select two answers)

  • A. the__name__variable content determines the way in which the module was run
  • B. a package can be stored as a tree of sub-directories/sub-folders
  • C. __pycache__is the name of a built-in variable
  • D. hashbang is the name of a built-in Python function

Answer: D

 

NEW QUESTION 42
What is the expected behavior of the following code?

  • A. it outputs error
  • B. the code is erroneous and it will not execute
  • C. it outputs <class ' IndexError' >
  • D. it outputs list assignment index out of range

Answer: D

 

NEW QUESTION 43
Assuming that the following code has been executed successfully, select the expressions which evaluate to True (Select two answers)

  • A. b( ) > 2
  • B. a is b
  • C. a is not None
  • D. a() > 2

Answer: A,C,D

 

NEW QUESTION 44
What is true about the following snippet? (Select two answers)

  • A. the siring I feel fine 'will be seen
  • B. the string what a pity will be seen
  • C. the code will raise an unhandled exception
  • D. thestring it's niceto see youwill be seen

Answer: A,B

 

NEW QUESTION 45
Assuming that the following code has been executed successfully, select the expressions which evaluate to True (Select two answers)

  • A. b( ) > 2
  • B. a is b
  • C. a is not None
  • D. a() > 2

Answer: A,C,D

 

NEW QUESTION 46
Assuming that the math module has been successfully imported, which of the following expressions evaluate to True? (Select two answers)

  • A. math. hypot (2,5) == math.truec (2.5)
  • B. math. hypot (2,5) == math.true (2.5)
  • C. math. cell (2,5) == math.floor (2.5)
  • D. math. hypot (3,4) == math.sqrt (25)

Answer: A,D

 

NEW QUESTION 47
What is the expected out of the following code of the file named zero_length_existing_file is a zero-length file located inside the working directory?

  • A. 0
  • B. 1
  • C. an errno value corresponding to file not found
  • D. 2

Answer: A

 

NEW QUESTION 48
......

[Aug-2021] Pass Python Institute PCAP-31-03 Exam in First Attempt Guaranteed: https://drive.google.com/open?id=1I3ODsJLDz4Wz975fT57_Zq-wSfM-L9kS

Reduce Your Chance of Failure in PCAP-31-03 Exam: https://www.examprepaway.com/Python-Institute/braindumps.PCAP-31-03.ete.file.html