Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.
Agree, D is correct:
try:
f = open("linije","w")
print(1, end="")
s = f.readline()
print(2, end="")
except IOError as error:
print(3, end="")
else:
f.close()
print(4,end="")
The IOError exception is raised by the line s = f.readline() because the file was opened in write mode ('w'), and readline() tries to read from a file opened in write mode, which is not allowed.
D
s = f.readline() --> io.UnsupportedOperation: not readable
upvoted 2 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
vlobachevsky
Highly Voted 2 years, 6 months agomazimir
2 years, 6 months agoDamon54
Most Recent 2 months, 3 weeks agomplopez
7 months, 4 weeks agoJanpcap123
8 months agodicksonpwc
1 year ago9prayer
1 year, 2 months agoMallie
1 year, 4 months agoJnanada
1 year, 8 months agoBaldridge
1 year, 11 months agomacxsz
2 years agoMTLE
2 years agomacxsz
2 years agoNoarmy315
2 years, 4 months ago