Deal of The Day! Hurry Up, Grab the Special Discount - Save 25%
- Ends In
00:00:00
Coupon code:
SAVE25
X
Welcome to Pass4Success
Login
|
Sign up
-
Free
Preparation Discussions
Mail Us
support@pass4success.com
Location
US
MENU
Home
Popular vendors
Salesforce
Microsoft
Nutanix
Amazon
Google
CompTIA
SAP
VMware
Fortinet
PeopleCert
Eccouncil
HP
Palo Alto Networks
Adobe
ServiceNow
Dell EMC
CheckPoint
Linux Foundation
Close
Discount Deals
New
About
Contact
Login
Sign up
Home
Discussions
Python Institute Discussions
Exam PCAP-31-03 Topic 4 Question 62 Discussion
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)
A
closing an open file is performed by the closefile ( ) function
B
the second open ( ) argument describes the open mode and defaults to 'w'
C
if open ( ) 's second argument is 'r' the file must exist or open will fail
D
if open ( )'s second argument is 'w' and the invocation succeeds, the previous file's content is lost
Show Suggested Answer
Hide Answer
Suggested Answer:
C
by
Joesph
at
Apr 20, 2024, 10:18 AM
Limited Time Offer
25%
Off
Get Premium PCAP-31-03 Questions as Interactive Web-Based Practice Test or PDF
Contribute your Thoughts:
Submit
Cancel
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
...
Log in to Pass4Success
×
Sign in:
Forgot my password
Log in
Report Comment
×
Is the comment made by
USERNAME
spam or abusive?
Commenting
×
In order to participate in the comments you need to be logged-in.
You can
sign-up
or
login
Save
Cancel
a
Ira
27 days agoLachelle
29 days agoPhung
3 days agoDona
9 days agoAlyssa
1 months agoAnnette
5 days agoFrancis
28 days agoAlex
1 months agoQuentin
2 days agoTu
3 days agoMy
2 months agoAnnabelle
25 days agoAnnabelle
1 months agoEleonora
2 months agoJennifer
2 months agoTricia
2 months ago