PCAP-31-03 Practice Test practice questions, page 4 of 5, with answer review and explanations.
Question 16
Which of the following invocations are valid? (Choose two.)
sort("python")
"python".find("")
"python".sort()
sorted("python")
Question 17
Which of the following expressions evaluate to True? (Choose two.)
'in' in 'in'
'in' in 'Thames'
'in not' in 'not'
't'.upper() in 'Thames'
Question 18
Assuming that the snippet below has been executed successfully, which of the following expressions will evaluate to True? (Choose two.) string = 'python'[::2] string = string[-1] + string[-2]
len(string) == 3
string[0] == 'o'
string[0] == string[-1]
string is None
Question 19
Which of the following statements are true? (Choose two.)
an escape sequence can be recognized by the / sign put in front of it
ASCII is a subset of UNICODE
II in ASCII stands for Internal Information
a code point is a number assigned to a given character
Question 20
A property that stores information about a given class’s super-classes is named: