Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer
- 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
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
1 months 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
2 months ago
D is definitely right, but I'm not sure about B. Wait, is this a trick question? *sweats nervously*
upvoted
0
times
Georgiann
12 days ago
B) the second open ( ) argument describes the open mode and defaults to 'w'
upvoted
0
times
...
Phung
21 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
27 days ago
A) closing an open file is performed by the closefile ( ) function
upvoted
0
times
...
...
Alyssa
2 months ago
Well, at least they didn't ask about the 'a' mode. That one always trips me up!
upvoted
0
times
Annette
23 days ago
C) if open ( ) 's second argument is 'r' the file must exist or open will fail
upvoted
0
times
...
Francis
2 months ago
A) closing an open file is performed by the closefile ( ) function
upvoted
0
times
...
...
Alex
2 months ago
I thought the open() function had more than two arguments? This question seems a bit too simple.
upvoted
0
times
Maia
9 days ago
C) if open ( ) 's second argument is 'r' the file must exist or open will fail
upvoted
0
times
...
Coletta
16 days ago
I always thought open() had more arguments too.
upvoted
0
times
...
Quentin
20 days ago
B) the second open ( ) argument describes the open mode and defaults to 'w'
upvoted
0
times
...
Tu
21 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
1 months ago
Closing a file is done with the close() function, not closefile().
upvoted
0
times
...
Annabelle
2 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
3 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
Ira
1 months agoLachelle
2 months agoGeorgiann
12 days agoPhung
21 days agoDona
27 days agoAlyssa
2 months agoAnnette
23 days agoFrancis
2 months agoAlex
2 months agoMaia
9 days agoColetta
16 days agoQuentin
20 days agoTu
21 days agoMy
2 months agoAnnabelle
1 months agoAnnabelle
2 months agoEleonora
2 months agoJennifer
2 months agoTricia
3 months ago