[Q43-Q62] 実際にあるPCAP-31-03問題集でリアルPython Institute問題集PDFを提供しています [2022年01月]

Share

実際にあるPCAP-31-03問題集でリアルPython Institute問題集PDFを提供しています [2022年01月]

実際のGoShiken PCAP-31-03問題集PDFで100%合格率を保証します

質問 43
Assuming that the following snippet has been successfully executed, which of the equations are False? (Select two answers)

  • A. a[0] = b[0]
  • B. a [0]-1 ==b [0]
  • C. b[0] - 1 == a[0]
  • D. len(a)== len (b)

正解: B,D

解説:
>>> print(len(a)==len(b))
True
>>> print(a[0]-1==b[0])
True
>>> print(a[0]==b[0])
False
>>> print(b[0]-1 == a[0])
False

 

質問 44
What is the expected behavior of the following code?

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

正解: C

 

質問 45
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. bf. readinto (data = bytearray (16))
  • C. data = binfile.read (bytearray (16))
  • D. data = bytearray (16) bf.readinto (data)

正解: A,D

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

 

質問 46
Assuming that the following snippet has been successfully executed, which of the equations are False? (Select two answers)

  • A. len(a) == len(b)
  • B. a[0] - 1 == b[0]
  • C. b[0] - 1 == a[0]
  • D. a[0] = b[0]

正解: C,D

解説:
>>> print(len(a)==len(b))
True
>>> print(a[0]-1==b[0])
True
>>> print(a[0]==b[0])
False
>>> print(b[0]-1 == a[0])
False

 

質問 47
What is the expected output of the following snippet?

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

正解: A

解説:

 

質問 48
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? (Select two answers)

  • A. str(Object) == 'Object'
  • B. ClassA. _module_ == 'ClassA'
  • C. len(ClassB.__bases__) == 1
  • D. _name == _main_'

正解: C,D

 

質問 49
Executing the following snippet

will cause the dct:

  • A. to hold one key named 'pi' linked to 3.1415
  • B. to hold two key named 'pi' linked to 3.14 and 3.1415
  • C. to hold two keys named 'pi' linked to 3.1415
  • D. to hold two keys named 'pi' linked to 3.14 and 3.1415 respectively

正解: A

 

質問 50
Python's built-in function named open () tries to open a file and returns:

  • A. a stream object
  • B. an integer value identifying an opened file
  • C. an error code (0 means success)
  • D. always None

正解: A

 

質問 51
What can you do if you don't like a long package path tike this one0 import alpha.beta.gamma.delta.epsiIon.zeta

  • A. you can make an alias for the name using die as keyword
  • B. nothing; you need to come to terms with it
  • C. you can shorten it to alpha. zeta and Python will find the proper connection
  • D. you can make an alias for the name using the a 1 i a s keyword

正解: A

 

質問 52
What can you do if you don't like a long package path like this one?

  • A. you can make an alias for the name using the alias keyword
  • B. you can make an alias for the name using the as keyword
  • C. you can shorten it to alpha. zeta and Python will find the proper connection
  • D. nothing, you need to come to terms with it

正解: B

 

質問 53
A file name like this one below says mat: (select three answers)
services. cpython-36.pyc

  • A. it is the 36th version of the file
  • B. the interpreter used to generate the file is version 3.6
  • C. the file comes from the services . py source file
  • D. it has been produced by CPython

正解: B,C,D

 

質問 54
What is the expected behavior of the following code?

  • A. it outputs [4, 2]
  • B. it outputs [0, 1, 2, 3, 4]
  • C. it outputs [2, 4]
  • D. the code is erroneus and it will not execute

正解: A

 

質問 55
What is the expected output of the following code?

  • A. None
  • B. True
  • C. 0
  • D. False

正解: B

 

質問 56
The following class definition is given. We want the show () method to invoke the get () method, and then output the value the get () method returns. Which of the invocations should be used instead of XXX?

  • A. print (self.get (val))
  • B. print (get(self))
  • C. print (get())
  • D. print (self.get())

正解: D

 

質問 57
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

正解: D

 

質問 58
What is the expected behavior of the following code?

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

正解: C

 

質問 59
Which of the following statement are true? (Select two answers)

  • A. the second open ( ) argument describes the open mode and defaults to 'w'
  • B. if open ( ) 's second argument is 'r' the file must exist or open will fail
  • C. closing an open file is performed by the closefile ( ) function
  • D. if open ( )'s second argument is 'w' and the invocation succeeds, the previous file's content is lost

正解: B,D

 

質問 60
What is the expected output of the following snippet?

  • A. True upper
  • B. True lower
  • C. False upper
  • D. False lower

正解: B

 

質問 61
With regards to the directory structure below, select the proper forms of the directives in order to import module_a. (Select two answers)

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

正解: A,C

 

質問 62
......

検証済みPCAP-31-03問題集と解答で最新PCAP-31-03をダウンロード:https://www.goshiken.com/Python-Institute/PCAP-31-03-mondaishu.html

無料Python Institute PCAP-31-03試験問題と解答があります:https://drive.google.com/open?id=1zg7oUomsaTW0QBDxyk9rItSlKwlL1XP-