Python Institute PCAP-31-03 - Certified Associate in Python Programming Exam

Question #11 (Topic: Exam A)
What is the expected behavior of the following code?
A. it outputs error B. it outputs C. the code is erroneous and it will not execute D. it outputs list assignment index out of range
Answer: C
Question #12 (Topic: Exam A)
Which of the following expressions evaluate to True? (Choose two.)
A. ord("0") - ord("9") == 10 B. len("''") == 2 C. chr(ord('z') - 1) == 'y' D. len(''1234'') == 4
Answer: CD
Question #13 (Topic: Exam A)
Which of the following expressions evaluate to True? (Choose two.)
A. 'xYz'.lower() > 'XY' B. '8'+'8' ! = 2 * '8' C. float ('3.14') == str('3.' + '14') D. 121 + 1 == int('1' + 2 * '2')
Answer: AD
Question #14 (Topic: Exam A)
What is the expected behavior of the following code?
A. it outputs 3 B. it outputs 'None' C. it outputs 0 D. it raises an exception
Answer: D
Question #15 (Topic: Exam A)
What is the expected behavior of the following code?
the_list = "alpha;beta;gamma".split(";")
the_string = ''.join(the_list)
print(the_string.isalpha())
A. it outputs True B. it outputs False C. it outputs nothing D. it raises an exception
Answer: A
Download Exam
Page: 3 / 26
Total 129 questions