PFP191_-_SU_2024_-_FE_2357.webp
T

PFP191_-_SU_2024_-_FE_2357.webp

Kizspy | Question: 20 (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
thanhphu2003
Ngày thêm
Lượt xem
1,019
Lượt bình luận
4
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom