If you need to serve two different exceptions called Ex1 and Ex2 in one except branch, you can write:
- A. except Ex1 Ex2:
- B. except (ex1, Ex2):
- C. except Ex1, Ex2:
- D. except Ex1+Ex2:
Free PCAP sample questions for the Certified Associate in Python Programming exam. No account required: study at your own pace.
Want an interactive quiz? Take the full PCAP practice testLooking for more? Click here to get the full PDF with 53+ practice questions for $10 for offline study and deeper preparation.
If you need to serve two different exceptions called Ex1 and Ex2 in one except branch, you can write:
Which of the following expressions evaluate to True? (Choose two.)
What is true about Python class constructors? (Choose two.)
A function called issubclass (c1, c2) is able to check if:
Which of the following statements are true? (Choose two.)
UNICODE is:
Assuming that the snippet below has been executed successfully, which of the following expressions evaluate to True? (Choose two.) string = 'python'[::2] string = string[-1] + string[-2]
Python's built in function named open () tries to open a file and returns:
Which of the following expressions evaluate to True? (Choose two.)
Which of the following invocations are valid? (Choose two.)
There is a stream named s open for writing. What option will you select to write a line to the stream?
A two-parameter lambda function raising its first parameter to the power of the second parameter should be declared as:
Which of the following statements are true? (Choose two.)
Which of the following words can be used as a variable name? (Choose two.)
Package source directories/folders can be:
Download the complete PCAP study bundle with 53+ questions in a single printable PDF.