SlidePub
Home
Categories
Login
Register
Home
Technology
Exception_Handling_in_. Python_PPT.pptx
Exception_Handling_in_. Python_PPT.pptx
priyanshuraj142007
0 views
9 slides
Oct 08, 2025
Slide
1
of 9
Previous
Next
1
2
3
4
5
6
7
8
9
About This Presentation
Exception handling in python
Size:
34.94 KB
Language:
en
Added:
Oct 08, 2025
Slides:
9 pages
Slide Content
Slide 1
Exception Handling in Python Student Name: Navya Kumari Roll No: 2024-E-48
Slide 2
Introduction - Error = problem in program - Exception = error during execution - Exception handling makes program safe - Prevents sudden crash
Slide 3
Theory (Basics) - try → risky code - except → handles error - else → if no error - finally → always runs - raise → generate error
Slide 4
Theory (Clauses & Classes) - try–except–else clause - try–finally clause - Multiple except blocks - Built-in Exceptions: ZeroDivisionError, ValueError, TypeError
Slide 5
Working Code (Example 1) try: x = int(input('Enter number: ')) y = int(input('Enter another: ')) print(x / y) except ZeroDivisionError: print('Cannot divide by zero') finally: print('Done')
Slide 6
Working Code (Example 2 - Raising) age = -3 if age < 0: raise ValueError('Age cannot be negative')
Slide 7
Questions One Word: - Keyword to raise exception → raise - Keyword always executed → finally Match: 1. try → test 2. except → handle 3. else → if no error 4. finally → always run MCQs: 1. Divide by zero error → ZeroDivisionError 2. Optional block → else Fill in the blanks: 1. Block to catch errors → except 2. Keyword to raise error → raise
Slide 8
Conclusion - Exception handling avoids program crash - Provides safe error recovery - Makes applications more reliable
Slide 9
Thank You Presented by: Navya Kumari Roll No: 2024-E-48
Tags
Categories
Technology
Download
Download Slideshow
Get the original presentation file
Quick Actions
Embed
Share
Save
Print
Full
Report
Statistics
Views
0
Slides
9
Age
54 days
Related Slideshows
11
8-top-ai-courses-for-customer-support-representatives-in-2025.pptx
JeroenErne2
44 views
10
7-essential-ai-courses-for-call-center-supervisors-in-2025.pptx
JeroenErne2
45 views
13
25-essential-ai-courses-for-user-support-specialists-in-2025.pptx
JeroenErne2
36 views
11
8-essential-ai-courses-for-insurance-customer-service-representatives-in-2025.pptx
JeroenErne2
33 views
21
Know for Certain
DaveSinNM
19 views
17
PPT OPD LES 3ertt4t4tqqqe23e3e3rq2qq232.pptx
novasedanayoga46
23 views
View More in This Category
Embed Slideshow
Dimensions
Width (px)
Height (px)
Start Page
Which slide to start from (1-9)
Options
Auto-play slides
Show controls
Embed Code
Copy Code
Share Slideshow
Share on Social Media
Share on Facebook
Share on Twitter
Share on LinkedIn
Share via Email
Or copy link
Copy
Report Content
Reason for reporting
*
Select a reason...
Inappropriate content
Copyright violation
Spam or misleading
Offensive or hateful
Privacy violation
Other
Slide number
Leave blank if it applies to the entire slideshow
Additional details
*
Help us understand the problem better