🔬 Computer science · Class 12 · virtual lab
Python exceptions: try, except, else, finally
Goal: See which blocks of a try statement run for good input, handled errors and unhandled errors.
- Predict
- Try
- Observe
- Record
- Explain
- Check
Loading the lab…
About this lab
Behind the experiment.
What this lab simplifies
- Only three simple statements are used.
- Only ValueError, ZeroDivisionError, IndexError and Exception are used.
- Real programs can nest try blocks and raise their own errors; this lab does not.
Chapters that use this lab (1)
No screen? Use paper.
The activity sheet has the same steps, a results table and the questions, ready to print.