Loading

Quipoin Menu

Learn • Practice • Grow

python / Custom Exceptions
exercise
1/5
Exercise 1Python
Question

Define a custom exception `NegativeNumberError`. Write a function that raises it if a number is negative. Handle it in the main code.