Define an empty custom exception class `InvalidAgeError` that inherits from Python’s base `Exception`. Read an integer age. If age is less than 0, raise `InvalidAgeError`. Catch it and print ‘InvalidAgeError caught’, otherwise print ‘Valid’.
A single integer.
Print the validation status.
None
-5
InvalidAgeError caught
Custom exceptions are created by simply inheriting from the built-in Exception class.
# Define InvalidAgeError here
if __name__ == '__main__':
age = int(input())
# Write try-except block here
passEmbedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used