โš ๏ธraise, Custom Exceptions, Exception ChainingWORKSHOP
1
2
3
4
5

Step 1

Write a `validate_age(age)` function that raises `ValueError` with a descriptive message if `age < 0` or `age > 150`. If the age is valid, return it. Test your function with ages: -1, 200, 25, 0, and 150.

โŒ˜ Enter (Mac) ยท Ctrl+Enter (Win/Linux)