What can you deduce from the following statement0 (Select two answers) str = open('file.txt', "rt")
Suggested Answer: B, D
Get Premium PCAP-31-03 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
11 comments · newest first
CH
Chan
1 year ago
Definitely agree with D, can't write to a file opened in read mode.
TE
Teri
1 year ago
B is true, newline translation happens in text mode.
JU
Juliann
1 year ago
I thought it would create the file if it doesn't exist? That's not right!
ST
Stevie
1 year ago
D makes sense, you can't write with 'rt' mode.
CA
Carli
1 year ago
A is correct, str holds the file content.
JO
Jospeh
1 year ago
I feel like option C is misleading; I don't think opening a file in read mode will create it if it doesn't exist.
LI
Lilli
1 year ago
I practiced a similar question, and I believe option B could be right since reading text files often involves newline translations.
CA
Carissa
1 year ago
I'm not entirely sure, but I remember something about "rt" mode meaning the file is opened for reading text, so maybe option D is correct?
RU
Ruthann
1 year ago
I think option A is definitely wrong because 'str' is just a variable name, not the content of the file.
OL
Oliva
1 year ago
Okay, let me see here. I know the StoreOnce 3620 is a backup appliance, so expanding the capacity is probably about adding storage. I'm leaning towards either A or B as the best options.
TW
Twanna
1 year ago
I've got this! The value can be anything, but the key cannot be another mapping, struct, integer, or Boolean. Option B is the way to go.