Correct answer: A
>>> read_file = open("me.txt", "r")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'me.txt'
Agree with A
>>> read_file = open("me.txt", "r")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'me.txt'
>>>
I'll go with A too.
The try block lets you test a block of code for errors.
The except block lets you handle the error.
The finally block lets you execute code, regardless of the result of the try- and except blocks.
try:
print(x)
except:
print("An exception occurred")
upvoted 3 times
...
This section is not available anymore. Please use the main Exam Page.350-901 Exam Questions
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.
wunderup
Highly Voted 2 years, 12 months agoFR99
Highly Voted 2 years, 9 months agoTeringzooi
Most Recent 7 months, 3 weeks agodesignated
9 months agoferock
1 year agokayleen
2 years, 5 months agosan111
2 years, 7 months agoblezzzo
2 years, 8 months ago