CODEITUP
CS Class 12 | Chapter 05 | Exception Handling
Get the CBSE CS PYTHON Class 12 Enroll in Class 12 Explore
[Link] book by Anand Sir CS/CUET CS Live Batches C/C++/Java Courses
CODEITUP
CS Class 12 | Chapter 05 | Exception Handling
Get the CBSE CS PYTHON Class 12 Enroll in Class 12 Explore
[Link] book by Anand Sir CS/CUET CS Live Batches C/C++/Java Courses
CODEITUP
CS Class 12 | Chapter 05 | Exception Handling
Get the CBSE CS PYTHON Class 12 Enroll in Class 12 Explore
[Link] book by Anand Sir CS/CUET CS Live Batches C/C++/Java Courses
CODEITUP
CS Class 12 | Chapter 05 | Exception Handling
Get the CBSE CS PYTHON Class 12 Enroll in Class 12 Explore
[Link] book by Anand Sir CS/CUET CS Live Batches C/C++/Java Courses
CODEITUP
CS Class 12 | Chapter 05 | Exception Handling
Get the CBSE CS PYTHON Class 12 Enroll in Class 12 Explore
[Link] book by Anand Sir CS/CUET CS Live Batches C/C++/Java Courses
CODEITUP
CS Class 12 | Chapter 05 | Exception Handling
Get the CBSE CS PYTHON Class 12 Enroll in Class 12 Explore
[Link] book by Anand Sir CS/CUET CS Live Batches C/C++/Java Courses
CODEITUP
CS Class 12 | Chapter 05 | Exception Handling
Get the CBSE CS PYTHON Class 12 Enroll in Class 12 Explore
[Link] book by Anand Sir CS/CUET CS Live Batches C/C++/Java Courses
CODEITUP
CS Class 12 | Chapter 05 | Exception Handling
try:
a=int(input("Enter Numerator:")) try:
b=int(input("Enter Denominator:")) a=int(input("Enter Numerator:"))
b=int(input("Enter Denominator:"))
c=a/b c=a/b
print(c) print(c)
except ZeroDivisionError: except ZeroDivisionError:
print("Divide By Zero") print("Divide By Zero")
except ValueError: except ValueError:
print("Wrong Value Supplied") print("Wrong Value Supplied")
except:
print("Some Error Happened")
Get the CBSE CS PYTHON Class 12 Enroll in Class 12 Explore
[Link] book by Anand Sir CS/CUET CS Live Batches C/C++/Java Courses
CODEITUP
CS Class 12 | Chapter 05 | Exception Handling
try:
a=int(input("Enter Numerator:"))
b=int(input("Enter Denominator:"))
c=a/b
print(c)
except ZeroDivisionError:
print("Divide By Zero")
except ValueError:
print("Wrong Value Supplied")
except:
print("Some Error Happened")
else:
print("Program Executed Successfully...")
finally:
print("I will always be executed...")
Get the CBSE CS PYTHON Class 12 Enroll in Class 12 Explore
[Link] book by Anand Sir CS/CUET CS Live Batches C/C++/Java Courses
CODEITUP
CS Class 12 | Chapter 05 | Exception Handling
age=int(input("Enter Your Age:"))
if age<18:
raise Exception("Age Less than 18")
else:
print("Eligible for Voting...")
Get the CBSE CS PYTHON Class 12 Enroll in Class 12 Explore
[Link] book by Anand Sir CS/CUET CS Live Batches C/C++/Java Courses