PFP191_-_SP_2025_-_RE_3696.webp
Bakugo2001

PFP191_-_SP_2025_-_RE_3696.webp

Kizspy | Question: 22
(Choose 1 answer)
The following code sequence fails with a traceback when the user enters a file that does not exist. How would
you avoid the traceback and make it so you could print out your own error message when a bad file name
was entered?
fname = raw_input('Enter the file name: ')
fhand
open(fname)
A. try / except
B. signal handlers
C. try/catch/finally
D. on error resume next

Thông tin

Category
PFP191
Thêm bởi
Bakugo2001
Ngày thêm
Lượt xem
685
Lượt bình luận
5
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom