What is the expected behavior of the following code?
x = 8 ** (1/3)
y = 2. if x < 2.3 else 3.
print(y)
A. it outputs 2.0
B. it outputs 2. 5
C. it outputs 3.0
D. the code is erroneus and it will not execute
正解:A
質問 2:
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. 'key' in diet
B. 'key' in diet.keys()
C. diet.exists('key')
D. diet['key'] != None
正解:A,B
質問 3:
Which of the following expressions evaluate to True? (Select two answers)
A. '1' + '2' * 2 !=2 '12'
B. 'abc' .upper () < 'abc'
C. 11 == '011'
D. 3 * 'a' < 'a' * 2
正解:A,B
質問 4:
If you want to access an exception object's components and store them in an object called e, you have to use the following form of exception statement
A. such an action is not possible in Python
B. except Exception(e):
C. except e=Exception:
D. except Exception as e:
正解:D
質問 5:
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. hypot (3,4) == math.sqrt (25)
D. math. cell (2,5) == math.floor (2.5)
正解:A,C
質問 6:
Which of the following expressions evaluate to True? (Select two answers)
A. str(1-1) in '0123456739'[:2]
B. 'deb' not in 'abcde' [::-1]
C. 'phd' in 'alpha'
D. 'True' not in 'False'
正解:B,D
釈由** -
PCAP-31-03問題集にてひたすら勉強して、試験中にかなり順調に回答しました。合格できました。まさにお買い得なPass4TestさんのPCAP-31-03問題集だなって思いました。