Class 12 Computer Science · Chapter 5 · Test 4
Exceptions and Profiling
47 MCQs
47 questions · 40 min · 47 marks
Want to try first? Take the free Computer Science test: Networks Basics
Sample questions
The first 5 of 47. Try each one, then tap to see the answer.
Question 1
Exception handling manages errors that occur:
- AWhile the code is typed
- BBefore the file is saved
- CDuring program execution
- DWhile Python installs
Show answerHide answer
Answer: C
Exception handling deals with errors that arise while the program runs.
Question 2
Exception handling prevents a program from:
- ACrashing
- BUsing memory
- CPrinting output
- DAccepting input
Show answerHide answer
Answer: A
Exception handling stops a program from crashing suddenly.
Question 3
The Python keyword pair used for exception handling is:
- Atry-except
- Btry-finally
- Ctry-catch
- Dhandle-throw
Show answerHide answer
Answer: A
Python handles exceptions with try and except blocks.
Question 4
A program with exception handling can respond to unexpected situations:
- ASilently
- BRandomly
- CSlowly
- DGracefully
Show answerHide answer
Answer: D
Exception handling lets a program respond gracefully.
Question 5
Exception handling improves reliability and:
- ACompilation speed
- BUser experience
- CFile size
- DScreen resolution
Show answerHide answer
Answer: B
It improves reliability and user experience.
More tests in Code Testing and Debugging
Practise with a free account
Save your scores, see which chapters need work, and keep a notebook of every question you got wrong.