Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Python Institute Exam PCAP-31-03 Topic 4 Question 62 Discussion

Actual exam question for Python Institute's PCAP-31-03 exam
Question #: 62
Topic #: 4
[All PCAP-31-03 Questions]

Which of the following statement are true? (Select two answers)

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

Ira
27 days ago
I'm just going to go with 'all of the above' and hope for the best. That's my secret exam-taking strategy!
upvoted 0 times
...
Lachelle
29 days ago
D is definitely right, but I'm not sure about B. Wait, is this a trick question? *sweats nervously*
upvoted 0 times
Phung
3 days ago
D) if open ( )'s second argument is 'w' and the invocation succeeds, the previous file's content is lost
upvoted 0 times
...
Dona
9 days ago
A) closing an open file is performed by the closefile ( ) function
upvoted 0 times
...
...
Alyssa
1 months ago
Well, at least they didn't ask about the 'a' mode. That one always trips me up!
upvoted 0 times
Annette
5 days ago
C) if open ( ) 's second argument is 'r' the file must exist or open will fail
upvoted 0 times
...
Francis
28 days ago
A) closing an open file is performed by the closefile ( ) function
upvoted 0 times
...
...
Alex
1 months ago
I thought the open() function had more than two arguments? This question seems a bit too simple.
upvoted 0 times
Quentin
2 days ago
B) the second open ( ) argument describes the open mode and defaults to 'w'
upvoted 0 times
...
Tu
3 days ago
A) closing an open file is performed by the closefile ( ) function
upvoted 0 times
...
...
My
2 months ago
B and D are correct. Closing a file is done with the close() function, not closefile().
upvoted 0 times
Annabelle
25 days ago
Closing a file is done with the close() function, not closefile().
upvoted 0 times
...
Annabelle
1 months ago
B and D are correct.
upvoted 0 times
...
...
Eleonora
2 months ago
I'm not sure about C, though. It seems like if the file doesn't exist, open ( ) with 'r' mode should still work.
upvoted 0 times
...
Jennifer
2 months ago
I agree with you, Tricia. A and D make sense because closefile ( ) function is used to close an open file and when opening a file with 'w' mode, the previous content is lost.
upvoted 0 times
...
Tricia
2 months ago
I think A and D are true.
upvoted 0 times
...

Save Cancel
a