You are on page 1of 1

EXCEPTION HANDLING PROGRAMS

1. Write a program that prompts the user to enter a number. If the


number is positive or zero print it, other wise (string or negative
value) raise an exception.
2. Write a program that raises at least two exceptions.
3. Write a program that has a try, multiple except, else and a finally
block with file handling concept(Handle FILE NOT FOUND ERROR)
4. Write a program that validates name and age as entered by the
user to determine whether the person can cast vote or not.

You might also like