LearnPy Hub
← All topics
Topic Practice · Intermediate

Exceptions problems

50 problems: 22 Easy, 18 Medium, 10 Hard.

Review the Exceptions lesson
✓1. Safe Number
5 test cases
EasyNot tracked
✓2. Safe Division
4 test cases
EasyNot tracked
✓3. Safe Index
4 test cases
EasyNot tracked
✓4. Safe Lookup
4 test cases
EasyNot tracked
✓5. Name the Error
4 test cases
EasyNot tracked
✓6. Show the Error Message
4 test cases
EasyNot tracked
✓7. No Such Method
4 test cases
EasyNot tracked
✓8. Raise for a Bad Month
4 test cases
EasyNot tracked
✓9. Nested try Blocks
4 test cases
EasyNot tracked
✓10. Age Next Year, Safely
4 test cases
EasyNot tracked
✓11. Average of Nothing
4 test cases
EasyNot tracked
✓12. Count Every Attempt
4 test cases
EasyNot tracked
✓13. First Word or Empty
4 test cases
EasyNot tracked
✓14. Grade Point Lookup
4 test cases
EasyNot tracked
✓15. Only If It Worked
4 test cases
EasyNot tracked
✓16. Raise for an Empty Name
4 test cases
EasyNot tracked
✓17. Convert Every Item
4 test cases
EasyNot tracked
✓18. Count the Bad Lines
4 test cases
EasyNot tracked
✓19. Decimal or Not
4 test cases
EasyNot tracked
✓20. Adding Text and a Number
4 test cases
EasyNot tracked
✓21. Add Pairs Safely
4 test cases
EasyNot tracked
✓22. assert a Rule
4 test cases
EasyNot tracked
✓23. else and finally
4 test cases
MediumNot tracked
✓24. Sum the Valid Numbers
4 test cases
MediumNot tracked
✓25. Raise an Error
4 test cases
MediumNot tracked
✓26. Keep Asking
4 test cases
MediumNot tracked
✓27. Age Validator
5 test cases
MediumNot tracked
✓28. Custom Exception
4 test cases
MediumNot tracked
✓29. Several Except Blocks
5 test cases
MediumNot tracked
✓30. Parse key=value
4 test cases
MediumNot tracked
✓31. Mixed Types
4 test cases
MediumNot tracked
✓32. One except for Two Errors
4 test cases
MediumNot tracked
✓33. Custom Error With Data
4 test cases
MediumNot tracked
✓34. Raise From Another Error
4 test cases
MediumNot tracked
✓35. Which Errors Happened?
4 test cases
MediumNot tracked
✓36. Insufficient Funds
4 test cases
MediumNot tracked
✓37. Report Bad Lines
4 test cases
MediumNot tracked
✓38. Raise a TypeError
4 test cases
MediumNot tracked
✓39. Valid Dates Only
4 test cases
MediumNot tracked
✓40. Average of the Good Values
4 test cases
MediumNot tracked
✓41. Assertions
4 test cases
HardNot tracked
✓42. Convert a Table
4 test cases
HardNot tracked
✓43. Log and Re-raise
4 test cases
HardNot tracked
✓44. Order of Clean-up
4 test cases
HardNot tracked
✓45. Validate a Grid
4 test cases
HardNot tracked
✓46. Read Until the End
4 test cases
HardNot tracked
✓47. Calculator That Never Crashes
4 test cases
HardNot tracked
✓48. Three Tries Only
4 test cases
HardNot tracked
✓49. Calculator With Clear Errors
4 test cases
HardNot tracked
✓50. A Family of Validation Errors
4 test cases
HardNot tracked
← Back to all topics
Exceptions practice problems · LearnPy Hub