Python Institute PCAP-31-03練習テストPDF試験材料 [Q29-Q50]

Share

Python Institute PCAP-31-03練習テストPDF試験材料

PCAP-31-03解答PCAP-31-03無料サンプルには全てリアル試験合格させます

質問 # 29
Which of the following expression evaluate to True? (Select two answers) A)

B)

C)

D)

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

正解:C、D


質問 # 30
Which of the following invocations are valid? (Select two answers)

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

正解:A、C


質問 # 31
What is the expected behavior of the following snippet?

It will:

  • A. print [1J
  • B. cause a runtime exception
  • C. print 1
  • D. print 0 , [1]

正解:B

解説:


質問 # 32
What is the expected behavior of the following snippet?

It will:

  • A. cause a runtime exception on line 01
  • B. cause a runtime exception on line 02
  • C. cause a runtime exception on line 03
  • D. print3

正解:D

解説:


質問 # 33
Assuming that the following code has been executed successfully, select the expressions which evaluate to True (Select two answers)

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

正解:B、C、D


質問 # 34
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) = 'Object1
  • B. __name__== '__main__'
  • C. len (ClassB.__bases__) == 2
  • D. Class A.__module__ == ' main__'

正解:C、D


質問 # 35
What is the expected output of the following code?

  • A. 0
  • B. 1
  • C. 2
  • D. 3

正解:A

解説:


質問 # 36
Assuming that the following inheritance set is in force, which of the following classes are declared properly? (Select two answers)

  • A. class Class_2(B,D): pass
  • B. class Class_1(C,D): pass
  • C. class Class_4 (D, A) : pass
  • D. class Class_3(A,C): pass

正解:B、C


質問 # 37
Which of the following lines of code will work flawlessly when put independently inside the inc ( ) method in order to make the snippet's output equal to 3? (Select two answers)

  • A. self.put (get ( ) + vaI)
  • B. self.put (self.prop + vaI)
  • C. self.put (self.get ( ) + vaI)
  • D. put (self.prop + vaI)

正解:B、C


質問 # 38
What is the expected behavior of the following code?

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

正解:A


質問 # 39
What is the expected behavior of the following code?

  • A. it raises an exception
  • B. it outputs 2
  • C. it outputs 1
  • D. it outputs 0

正解:A


質問 # 40
Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Choose two.)

  • A. obj_a is obj_aa
  • B. B.VarA == 1
  • C. A.VarA == 1
  • D. isinstance (obj_b,A)

正解:A、D


質問 # 41
Can a module run like regular code?

  • A. it depends on the Python version
  • B. yes, but it cannot differentiate its behavior between the regular launch and import
  • C. no. it is not possible; a module can be imported, not run
  • D. yes, and it can differentiate its behavior between the regular launch and import

正解:D


質問 # 42
What is the expected behavior of the following code?

  • A. it outputs 6
  • B. it outputs 3
  • C. it raises an exception
  • D. it outputs 1

正解:A


質問 # 43
What is the expected output of the following code if there is no file named non existing_file inside the working directory?

  • A. 1 3
  • B. 1 2 3
  • C. 2 2 3
  • D. 2 2

正解:C


質問 # 44
An operator able to perform bitwise shifts is coded as (select two answers)

  • A. <<
  • B. ++
  • C. >>
  • D. - -

正解:A、C


質問 # 45
Which of the following statements are true? (Select two answers)

  • A. ASCII is synonymous with UTF-8
  • B. a code point is a number assigned to a given character
  • C. \e is an escape sequence used to mark the end of lines
  • D. II in ASCII stands for Information Interchange

正解:A、B


質問 # 46
What would you use instead of XXX if you want to check whether a certain ' key' exists in a dictionary called diet? (Select two answers) II if XXX:
print("Key exists")

  • A. diet['key'] != None
  • B. 'key' in diet.keys()
  • C. 'key' in diet
  • D. diet.exists('key')

正解:A、B


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

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

正解:D


質問 # 48
You need data which can act as a simple telephone directory. You can obtain it with the following clauses (choose two relevant variants; assume that no other items have been created before)

  • A. dir={'Mom':'5551234567', * Dad':'5557654321'}
  • B. dir={'Mom':5551234567, 'Dad':5557654321>
  • C. dir={Mom:'5551234567', Dad:'5557654321'}
  • D. dir={Mom:5551234567, Dad:5557654321}

正解:C、D


質問 # 49
What is true about Python packages? (Select two answers)

  • A. a package contents can be stored and distributed as an mp3 file
  • B. a code designed to initialize a package's state should be placed inside a file named init.py
  • C. _pycache_is a folder that stores semi-completed Python modules
  • D. the sys.path variable is a list of strings

正解:B、C


質問 # 50
......


この試験は、40の複数選択の質問で構成されており、65分間の期間があります。試験料には、試験の1回の試行と、試験が正常に完了したときにデジタル証明書が含まれます。候補者は、家やオフィスの快適さからオンラインで試験を受けることができ、忙しいスケジュールに簡単に収まることができます。

 

PCAP-31-03[2023年12月] 最新リリース] 試験問題あなたを必ず合格させます:https://www.jpntest.com/shiken/PCAP-31-03-mondaishu

弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

オンラインサポート時間:( UTC+9 ) 9:00-24:00
月曜日から土曜日まで

サポート:現在連絡