Certified Associate in Python Programming (PCAP-31) - Python Actual Exam Questions
Last updated on March 10, 2026
A two-parameter lambda function raising its first parameter to the power of the second parameter should be declared as:
lambda (x, y) = x ** y
lambda (x, y): x ** y
def lambda (x, y): return x ** y
lambda x, y: x ** y
to join the discussion
No discussions yet. Be the first to ask!
Delete Comment
Are you sure? This action cannot be undone.
A file name like this one below says mat: (select three answers) services. cpython-36.pyc
the interpreter used to generate the file is version 3.6
it has been produced by CPython
it is the 36th version of the file
the file comes from the services . py source file
to join the discussion
No discussions yet. Be the first to ask!
Delete Comment
Are you sure? This action cannot be undone.
What is the expected behavior of the following code?
it outputs False
it outputs True
it raises an exception
it outputs nothing
to join the discussion
No discussions yet. Be the first to ask!
Delete Comment
Are you sure? This action cannot be undone.
Which of the following invocations are valid? (Select two answers)
rfind("python","r")
sorted("python")
"python".sort ()
"python".index("th")
to join the discussion
No discussions yet. Be the first to ask!
Delete Comment
Are you sure? This action cannot be undone.
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]
string[0] == string[-1]
string is None
len (string] == 3
string[0] == 'o'
to join the discussion
No discussions yet. Be the first to ask!
Delete Comment
Are you sure? This action cannot be undone.
Finish Practice?
Are you sure you want to finish? This will end your practice session.