[2022年08月10日] 完全版には更新されたのはPython Institute PCAP(PCAP-31-03)認定サンプル問題
最新のPython Institute PCAP-31-03リアル試験問題集PDF
Python Institute PCAP-31-03 認定試験の出題範囲:
| トピック | 出題範囲 |
|---|---|
| トピック 1 |
|
| トピック 2 |
|
| トピック 3 |
|
| トピック 4 |
|
| トピック 5 |
|
| トピック 6 |
|
質問 33
Which of the following lines of code will work flawlessly when put independently inside the add_new () method in order to make the snippet's output equal to [0, 1, 1] ? (Select two answers)
- A. self .put (self.store[1])
- B. put self.store(1])
- C. self .put self.get () [-1])
- D. self put stire(1])
正解: A,D
質問 34
Assuming that the following snippet has been successfully executed, which of the equations are False? (Select two answers)
- A. a[0] - 1 == b[0]
- B. a[0] = b[0]
- C. len(a) == len(b)
- D. b[0] - 1 == a[0]
正解: 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
質問 35
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. 2
- D. an errno value corresponding to file not found
正解: A
質問 36
Assuming that the following code has been executed successfully, selected the expression which evaluate to True (Select two answers)
- A. b ( ) == 4
- B. a ! = b
- C. a is not None
- D. a ( ) == 4
正解: B,C
質問 37
Assuming that the snippet below has been executed successfully, which of the following expressions will evaluate to True? (Select two answers) string = 'python' [::2] string = string[-1] + string[-2]
- A. string is None
- B. string[0] == 'o'
- C. len (string] == 3
- D. string[0] == string[-1]
正解: B
質問 38
Assuming that the following inheritance set is in force, which of the following classes are declared properly?
(Select two answers)
- A. class Class_1(C,D): pass
- B. class Class_4 (D, A) : pass
- C. class Class_3(A,C): pass
- D. class Class_2(B,D): pass
正解: A,B
質問 39
Assuming that the code below has been executed successfully, which of the following expressions evaluate to True? (Select two answers)
- A. 'var' in Object.__diet__
- B. 'var1 in Class, diet
- C. 'prop' in Class.__diet
- D. len(Object.__diet__) == 1
正解: D
質問 40
A two-parameter lambda function raising its first parameter to the power of the second parameter should be declared as:
- A. def lambda (x, y): return x ** y
- B. lambda (x, y): x ** y
- C. lambda (x, y) = x ** y
- D. lambda x, y: x ** y
正解: D
質問 41
What is the expected output of the following code if the file named existing_text_file is a non-zero length text file located inside the working directory?
- A. 0
- B. the number of lines contained inside the file
- C. the length of the last line from the file
- D. the length of the first line from the file
正解: A
質問 42
Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Select two answers)
- A. obj_b.prop_a == 3
- B. B.VarA == 3
- C. hasattr(obj_b, 'prop_aa')
- D. isinstance(obj_c,A)
正解: C,D
質問 43
Assuming that the snippet below has been executed successfully, which of the following expressions will evaluate to True? (Select two answers) string = 'SKY' (:: -1) string = string (-1)
- A. string is None
- B. string (0) == string (-1
- C. len (string) == 1
- D. string (0) == 'Y'
正解: C,D
質問 44
What is true about Python packages? (Select two answers)
- A. a package can be stored as a tree of sub-directories/sub-folders
- B. __pycache__is the name of a built-in variable
- C. hashbang is the name of a built-in Python function
- D. the__name__variable content determines the way in which the module was run
正解: A,B
質問 45
What is true about Python class constructors? (Select two answers)
- A. the constructor's first parameter identifies an object currently being created
- B. the constructor can be invoked directly under strictly defined circumstances
- C. the constructor cannot use the default values of the parameters
- D. super-class constructor is invoked implicitly during constructor execution
正解: A,B
質問 46
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. put (self.prop + vaI)
- C. self.put (self.prop + vaI)
- D. self.put (self.get ( ) + vaI)
正解: C,D
質問 47
What is the expected output of the following snippet?
- A. True upper
- B. False lower
- C. True lower
- D. False upper
正解: D
質問 48
What is true about the following snippet? (Select two answers)
- A. the code will raise an unhandled exception
- B. the string what a pity will be seen
- C. the string it's nice to see you will be seen
- D. the string I feel fine 'will be seen
正解: B,D
質問 49
Select the valid fun () invocations:
(select two answers)
def fun (a, b=0):
return a*b
- A. fun (a=0)
- B. fun(b=1, 0)
- C. fun(b=1)
- D. fun (1)
正解: A,D
質問 50
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
質問 51
What is a true about python class constructors? (Select two answers)
- A. the constructor is a method named_init_
- B. the constructor must return a value other than None
- C. there can the more than one constructor in a Python class.
- D. the constructor must have at least one parameter
正解: A,D
質問 52
Which of the following expressions evaluate to True? (Select two answers)
- A. 11 == '011'
- B. 'abc' .upper () < 'abc'
- C. '1' + '2' * 2 !=2 '12'
- D. 3 * 'a' < 'a' * 2
正解: B,C
質問 53
Which of the following literals reflect the value given as 3 4. 2 3 (select two answers)
- A. .3423e-2
- B. 3423e2
- C. .3423e2
- D. 3423e-2
正解: C,D
解説:
質問 54
Which of the equations are True? (Select two answers)
- A. ord (ord (x)) = = x
- B. chr (chr (x)) = = x
- C. ord (chr (x)) = = x
- D. chr (ord (x)) = = x
正解: C,D
解説:
https://docs.python.org/3/library/functions.html#chr
https://docs.python.org/3/library/functions.html#ord
質問 55
Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Select two answers)
- A. obj_c.get() == 2
- B. C._C__VarA == 2
- C. is instance(obj_b,C)
- D. has atr (B, 'get')
正解: A,D
質問 56
......
Python Institute PCAP-31-03問題集で一発合格を目指すならこれ!:https://jp.fast2test.com/PCAP-31-03-premium-file.html
PCAP-31-03練習テスト問題更新されたのは145問があります:https://drive.google.com/open?id=1vudPDkggEMeahxXpfTgYNuexfAZCCZ9b