PCAP-31-03 Exam QuestionsBrowse all questions from this exam

PCAP-31-03 Exam - Question 39


Which of the following statements are true? (Choose two.)

Show Answer
Correct Answer: AD

When invoking open() fails, an exception is indeed raised, making this statement true. Additionally, open() is a function that returns an object representing a physical file, which is also a true statement. The statement that open() requires a second argument is incorrect as the mode argument is optional and defaults to 'r' (read mode). The names instd, outstd, and errstd are not standard terms for pre-opened streams in Python, making that option incorrect.

Discussion

4 comments
Sign in to comment
Dave304409Options: AC
Jul 3, 2024

A, C is correct

b4779c5Options: AD
Jun 26, 2024

the correct anserws are AandD

DKAT2023Options: AD
Jul 1, 2024

A and D are corrects

DKAT2023
Jul 1, 2024

sorry , A and C are corrects not D,