🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Exceptions and Files: all 15 questions

Quiz: Exceptions and Files · Question 13 of 15

Why is a bare except: (with no exception type) a bad idea?

Why is a bare except: (with no exception type) a bad idea?

  1. A.It is a SyntaxError
  2. B.It only catches ValueError
  3. C.It hides every error, including bugs you did not expect
  4. D.It makes the program slower
Answer & explanation

Correct answer: It hides every error, including bugs you did not expect

Catch only the errors you expect, such as ValueError for bad input.

Can you get the rest right without peeking?

Take the timed Quiz: Exceptions and Files quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →