Brand Logo

Class 9

Class 9 - English
Moments (9 Chapters)|
Beehive (18 Chapters)|
Words and Expressions - I (9 Chapters)
Class 9 - Health and Physical Education
Health and Physical Education (14 Chapters)
Class 9 - Hindi
Sanchayan (4 Chapters)|
Sparsh (10 Chapters)|
Kshitij (13 Chapters)|
Kritika (4 Chapters)
Class 9 - ICT
Information and Communication Technology (8 Chapters)
Class 9 - Mathematics
Mathematics (12 Chapters)
Class 9 - Sanskrit
Shemushi Prathmo Bhag (10 Chapters)|
Vyakaranavithi (20 Chapters)|
Abhyaswaan Bhav (15 Chapters)
Class 9 - Science
Science (12 Chapters)
Class 9 - Social Science
Contemporary India (6 Chapters)|
Democratic Politics (5 Chapters)|
Economics (4 Chapters)|
India and the Contemporary World - I (5 Chapters)

Class 10

Class 10 - English
First Flight (22 Chapters)|
Foot Prints Without feet (9 Chapters)|
Words and Expressions - II (9 Chapters)
Class 10 - Health and Physical Education
Health and Physical Education (13 Chapters)
Class 10 - Hindi
Kshitij - II (13 Chapters)|
Sparsh (14 Chapters)|
Sanchayan - II (3 Chapters)|
Kritika (3 Chapters)
Class 10 - Mathematics
Mathematics (14 Chapters)
Class 10 - Sanskrit
Vyakaranavithi (14 Chapters)|
Shemushi - II (12 Chapters)|
Abhyaswaan Bhav - II (14 Chapters)
Class 10 - Science
Science (13 Chapters)
Class 10 - Social Science
Contemporary India (7 Chapters)|
Democratic Politics (5 Chapters)|
India and the Contemporary World - II (5 Chapters)|
Understanding Economic Development (5 Chapters)
Class 10 - Urdu
Nawa-e-urdu (15 Chapters)

Class 11

Class 11 - Accountancy
Accountancy - II (2 Chapters)|
Financial Accounting - I (7 Chapters)
Class 11 - Biology
Biology (19 Chapters)
Class 11 - Biotechnology
Biotechnology (12 Chapters)
Class 11 - Business Studies
Business Studies (11 Chapters)
Class 11 - Chemistry
Chemistry Part - I (6 Chapters)|
Chemistry Part - II (3 Chapters)
Class 11 - Computer Science
Computer Science (11 Chapters)
Class 11 - Creative Writing and Translation
Srijan (4 Chapters)
Class 11 - Economics
Statistics for Economics (8 Chapters)|
Indian Economic Development (8 Chapters)
Class 11 - English
Hornbill (11 Chapters)|
Snapshots (5 Chapters)|
Woven Words (27 Chapters)
Class 11 - Fine Art
An Introduction to Indian Art Part - I (8 Chapters)
Class 11 - Geography
Fundamentals of Physical Geography (14 Chapters)|
India Physical Environment (6 Chapters)|
Practical Work in Geography (6 Chapters)
Class 11 - Health and Physical Education
Health and Physical Education (11 Chapters)
Class 11 - History
Themes in World History (13 Chapters)
Class 11 - Home Science
Human Ecology and Family Sciences - I (7 Chapters)|
Human Ecology and Family Sciences - II (4 Chapters)
Class 11 - Informatics Practices
Informatics Practices (8 Chapters)
Class 11 - Knowledge Traditions Practices of India
Knowledge Traditions Practices of India (9 Chapters)
Class 11 - Mathematics
Mathematics (14 Chapters)
Class 11 - Physics
Physics Part - I (7 Chapters)|
Physics Part - II (7 Chapters)
Class 11 - Political Science
Indian Constitution at Work (10 Chapters)|
Political Theory (8 Chapters)
Class 11 - Psychology
Introduction to Psychology (8 Chapters)
Class 11 - Sangeet
Tabla evam Pakhawaj (8 Chapters)|
Hindustani Sangeet Gayan Evam Vadan (10 Chapters)
Class 11 - Sociology
Understanding Society (5 Chapters)|
Introducing Sociology (5 Chapters)

Class 12

Class 12 - Accountancy
Accountancy Part - I (4 Chapters)|
Accountancy Part - II (6 Chapters)
Class 12 - Biology
Biology (13 Chapters)
Class 12 - Biotechnology
Biotechnology (13 Chapters)
Class 12 - Business Studies
Business Studies - II (3 Chapters)|
Business Studies - I (8 Chapters)
Class 12 - Chemistry
Chemistry - II (5 Chapters)|
Chemistry - I (5 Chapters)
Class 12 - Computer Science
Computer Science (13 Chapters)
Class 12 - Economics
Introductory Microeconomics (5 Chapters)|
Introductory Macroeconomics (6 Chapters)
Class 12 - English
Flamingo (14 Chapters)|
Vistas (7 Chapters)|
Kaliedoscope (21 Chapters)
Class 12 - Fine Art
An Introduction to Indian Art Part - II (8 Chapters)
Class 12 - Geography
Practical Work in Geography - Part II (4 Chapters)|
Fundamentals of Human Geography (8 Chapters)|
India - People and Economy (9 Chapters)
Class 12 - Hindi
Aroh (15 Chapters)|
Antra (23 Chapters)|
Antral Bhag - II (3 Chapters)|
Vitan (3 Chapters)
Class 12 - History
Themes in Indian History - III (4 Chapters)|
Themes in Indian History - I (4 Chapters)|
Themes in Indian History - II (4 Chapters)
Class 12 - Home Science
Human Ecology and Family Sciences Part I (7 Chapters)|
Human Ecology and Family Sciences Part II (7 Chapters)
Class 12 - Informatics Practices
Informatics Practices (7 Chapters)
Class 12 - Mathematics
Mathematics Part - I (6 Chapters)|
Mathematics Part - II (7 Chapters)
Class 12 - Physics
Physics Part - I (8 Chapters)|
Physics Part - II (6 Chapters)
Class 12 - Political Science
Politics in India Since Independence (8 Chapters)|
Contemporary World Politics (7 Chapters)
Class 12 - Psychology
Psychology (7 Chapters)
Class 12 - Sangeet
Hindustani Sangeet Gayan Evam Vadan (9 Chapters)|
Tabla evam Pakhawaj (7 Chapters)
Class 12 - Sociology
Social Change and Development in India (8 Chapters)|
Indian Society (7 Chapters)

About Edzy - Gamified Learning Platform

Edzy is India's premier gamified AI tutor platform for CBSE and State Board students in classes 6-12. Our platform transforms traditional studying with AI-powered study plans, interactive practice sessions, and personalized learning pathways. Students using Edzy experience unmatched learning efficiency through our immersive educational environment that combines advanced technology with curriculum-aligned content.

Why Choose Edzy for CBSE and State Board Preparation

Edzy offers an adaptive AI educational experience tailored to each student's learning style and pace. We integrate gamification with proven educational strategies to create an engaging environment that students love. Our micro-content approach breaks down complex CBSE and State Board topics into manageable lessons, building confidence through mastery-based progression and real-time feedback.

CBSE and State Board Focus Areas

Edzy specializes in transforming online education for classes 6-12 with AI-powered tutoring. We provide comprehensive NCERT-aligned content and engaging lessons across Mathematics, Science, English, Social Studies, and IT. Our system helps students master fundamental concepts and excel in board exams through AI-generated study plans, personalized learning timelines, and dynamic practice sessions.

Edzy's Unique Approach to Online Learning

Unlike traditional online coaching platforms, Edzy converts CBSE and State Board syllabus content into interactive learning adventures. Our AI tutor provides timely assistance while adapting to student progress. The platform features instant feedback, gamified practice sessions, and achievement badges to motivate continuous learning and concept mastery.

Brand Logo

Edzy | Largest Online Learning Platform for Classes 6–12

Study smarter with Edzy – India’s leading gamified AI tutor for CBSE and State Boards. Designed for Classes 6–12, Edzy offers interactive lessons, AI-powered study plans, and rewarding practice tools for every subject.

Find us on Social Media

Links

About EdzyFAQsContact UsCBSE CoursesDuelsRumblesEdzy App

Parents & Teachers

Search EdzyParent DashboardCreator PlatformEducation BlogCBSE & NCERT News

Policies

Terms and ConditionsRefund PolicyPrivacy PolicyCookie Policy

© 2026 Edzy | Largest Online Learning Platform for Classes 6–12. All rights reserved.

Edzy is an AI tutor for CBSE and State Board students, offering interactive lessons and personalized learning for Classes 6–12.

SitemapNews SitemapBlog SitemapSchool SitemapAccessibility
CBSE
Class 12
Computer Science
Computer Science
Exception Handling in Python

Question Bank

Question Bank: Exception Handling in Python

This chapter covers the concepts of exception handling in Python, explaining how to manage and respond to errors while programming, which is crucial for creating robust applications.

Question Bank - Exception Handling in Python

View all (103)
Q1.

What is an exception in Python?

Single Answer MCQ
Q-00094521
Q2.

What happens when a syntax error is encountered in a Python program?

Single Answer MCQ
Q-00094522
Q3.

Which of the following types of errors cannot be caught by exception handling?

Single Answer MCQ
Q-00094523
Q4.

Which of the following is a method to raise an exception in Python manually?

Single Answer MCQ
Q-00094524
Q5.

What block of code is used to handle exceptions in Python?

Single Answer MCQ
Q-00094525
Q6.

Which Python keyword is used to ensure that some code always runs after handling exceptions?

Single Answer MCQ
Q-00094526
Q7.

What type of Python error occurs when you divide by zero?

Single Answer MCQ
Q-00094527
Q8.

How do you access the error message from an exception in Python?

Single Answer MCQ
Q-00094528
Q9.

What will happen if an exception is not handled in Python?

Single Answer MCQ
Q-00094529
Q10.

Which of the following statements about exception handling is true?

Single Answer MCQ
Q-00094530
Q11.

In Python, what is the syntax for defining a custom exception?

Single Answer MCQ
Q-00094531
Q12.

What does the following code snippet do? 'try: x = 1 / 0 except ZeroDivisionError: print('Division by zero error')'

Single Answer MCQ
Q-00094532
Q13.

What keyword is used to catch exceptions in Python?

Single Answer MCQ
Q-00094533
Q14.

Which of the following is NOT a built-in exception in Python?

Single Answer MCQ
Q-00094534
Q15.

What is a syntax error in Python?

Single Answer MCQ
Q-00094565
Q16.

Which of the following will cause a syntax error in Python?

Single Answer MCQ
Q-00094566
Q17.

How does Python indicate a syntax error when you run your program?

Single Answer MCQ
Q-00094567
Q18.

What happens when a syntax error is detected in the code?

Single Answer MCQ
Q-00094568
Q19.

Which error type specifically checks for incorrect rules in syntax?

Single Answer MCQ
Q-00094569
Q20.

Which of the following statements contains a syntax error?

Single Answer MCQ
Q-00094570
Q21.

What does the term 'parsing errors' refer to?

Single Answer MCQ
Q-00094571
Q22.

Choose the option that best describes a common source of syntax errors in Python.

Single Answer MCQ
Q-00094572
Q23.

What would be the output if the following code has a syntax error: print('Hello World'?

Single Answer MCQ
Q-00094573
Q24.

Why must syntax errors be fixed before running a Python program?

Single Answer MCQ
Q-00094574
Q25.

In case of a syntax error, what action does the Python interpreter take?

Single Answer MCQ
Q-00094575
Q26.

Which of the following would NOT result in a syntax error?

Single Answer MCQ
Q-00094576
Q27.

What is the effect of multiple syntax errors in a single Python script?

Single Answer MCQ
Q-00094577
Q28.

What is the correct way to format an if statement in Python to avoid syntax errors?

Single Answer MCQ
Q-00094578
Q29.

How can syntax errors affect program debugging?

Single Answer MCQ
Q-00094579
Q30.

What type of error is raised when a division by zero occurs in Python?

Single Answer MCQ
Q-00094580
Q31.

What must be used in Python to handle exceptions gracefully?

Single Answer MCQ
Q-00094581
Q32.

Which exception is raised when trying to access an index that is out of range in a list?

Single Answer MCQ
Q-00094582
Q33.

What will happen if the 'except' block does not match any raised exception?

Single Answer MCQ
Q-00094583
Q34.

Which exception is raised when a module cannot be imported in Python?

Single Answer MCQ
Q-00094584
Q35.

How can multiple exceptions be handled in a single block in Python?

Single Answer MCQ
Q-00094585
Q36.

What kind of error is raised when the end of a file is reached without reading any data?

Single Answer MCQ
Q-00094586
Q37.

What does the 'raise' statement do in Python?

Single Answer MCQ
Q-00094587
Q38.

Which exception indicates that an operation has been performed on the wrong data type?

Single Answer MCQ
Q-00094588
Q39.

In Python, what does a finally block do?

Single Answer MCQ
Q-00094589
Q40.

What exception is raised when a local variable is not defined?

Single Answer MCQ
Q-00094590
Q41.

Consider the code: 'print(10 + '5')'. What exception will be raised?

Single Answer MCQ
Q-00094591
Q42.

If you want to ensure code execution occurs after a try-except block, what should be used?

Single Answer MCQ
Q-00094592
Q43.

Which of the following indicates incorrect indentation in your code?

Single Answer MCQ
Q-00094593
Q44.

What will the output be if a non-integer value is entered where an integer is expected?

Single Answer MCQ
Q-00094594
Q45.

What is a user-defined exception?

Single Answer MCQ
Q-00094595
Q46.

What exception is raised when an invalid index is accessed in a list?

Single Answer MCQ
Q-00094596
Q47.

Which built-in exception is triggered by incorrect indentation?

Single Answer MCQ
Q-00094597
Q48.

What does the EOFError signify in a Python program?

Single Answer MCQ
Q-00094598
Q49.

Which exception is raised when an operation is performed on an unsupported data type?

Single Answer MCQ
Q-00094599
Q50.

What happens when a denominator of zero is used in a division operation?

Single Answer MCQ
Q-00094600
Q51.

What does the ImportError exception indicate?

Single Answer MCQ
Q-00094601
Q52.

Which of the following exceptions could occur when trying to access a variable that has not been defined?

Single Answer MCQ
Q-00094602
Q53.

When is the OverflowError raised?

Single Answer MCQ
Q-00094603
Q54.

In what scenario would a KeyboardInterrupt be raised?

Single Answer MCQ
Q-00094604
Q55.

Identify the built-in exception that is raised when there is an issue with the data type used in an expression.

Single Answer MCQ
Q-00094605
Q56.

Which of the following statements correctly describes an ImportError?

Single Answer MCQ
Q-00094606
Q57.

When is a ValueError raised in Python?

Single Answer MCQ
Q-00094607
Q58.

What will be the output of the following code snippet if 'num' is not defined? print(num)

Single Answer MCQ
Q-00094608
Q59.

What type of exception would be raised by the following code? print(7 / 0)

Single Answer MCQ
Q-00094609
Q60.

What exception is likely to be raised when attempting to access a nonexistent key in a dictionary?

Single Answer MCQ
Q-00094610
Q61.

Which of the following is used to handle exceptions in Python?

Single Answer MCQ
Q-00094611
Q62.

What will be the output if a ZeroDivisionError occurs?

Single Answer MCQ
Q-00094612
Q63.

What exception is raised when trying to convert a non-numeric string to an integer?

Single Answer MCQ
Q-00094613
Q64.

Which statement is used to manually raise an exception in Python?

Single Answer MCQ
Q-00094614
Q65.

What is the primary purpose of the raise statement in Python?

Single Answer MCQ
Q-00094615
Q66.

How can you catch all exceptions in Python without specifying their types?

Single Answer MCQ
Q-00094616
Q67.

Which of the following is a built-in exception in Python?

Single Answer MCQ
Q-00094617
Q68.

What is the purpose of the 'finally' clause in exception handling?

Single Answer MCQ
Q-00094618
Q69.

What happens when an exception is raised using the raise statement?

Single Answer MCQ
Q-00094619
Q70.

What will happen if an exception is raised and not caught?

Single Answer MCQ
Q-00094620
Q71.

What is a common syntax for raising a custom exception in Python?

Single Answer MCQ
Q-00094621
Q72.

In Python, which of the following is a built-in exception?

Single Answer MCQ
Q-00094622
Q73.

When using the raise statement without any parameters, what is the expected outcome?

Single Answer MCQ
Q-00094623
Q74.

When a try block is executed, what happens if no exceptions occur?

Single Answer MCQ
Q-00094624
Q75.

In which scenario would you typically use the raise statement?

Single Answer MCQ
Q-00094625
Q76.

Where should an except clause be placed to handle exceptions appropriately?

Single Answer MCQ
Q-00094626
Q77.

Which of the following statements correctly raises a ZeroDivisionError?

Single Answer MCQ
Q-00094627
Q78.

What does the 'else' clause do in a try...except...else structure?

Single Answer MCQ
Q-00094628
Q79.

Which statement is true regarding user-defined exceptions?

Single Answer MCQ
Q-00094629
Q80.

What is the correct syntax to handle a specific exception in Python?

Single Answer MCQ
Q-00094630
Q81.

If an exception is raised in a function and it is not handled within that function, what happens?

Single Answer MCQ
Q-00094631
Q82.

Which built-in function can be used to create an assertion in Python?

Single Answer MCQ
Q-00094632
Q83.

Which of the following is NOT a valid reason to raise an exception?

Single Answer MCQ
Q-00094633
Q84.

What exception is typically used for handling unexpected input types?

Single Answer MCQ
Q-00094634
Q85.

In exception handling, what is the purpose of the finally block?

Single Answer MCQ
Q-00094635
Q86.

In the try-except-finally structure, what executes last?

Single Answer MCQ
Q-00094636
Q87.

What is the typical way to create a user-defined exception class in Python?

Single Answer MCQ
Q-00094637
Q88.

What will happen if a raised exception is not caught in a program?

Single Answer MCQ
Q-00094638
Q89.

What is the primary purpose of the finally clause in Python?

Single Answer MCQ
Q-00094655
Q90.

When is the finally block executed in a try-except-finally structure?

Single Answer MCQ
Q-00094656
Q91.

In which sequence should the finally block be placed in relation to try and except blocks?

Single Answer MCQ
Q-00094657
Q92.

What happens if an exception is not handled by the except blocks but a finally block is present?

Single Answer MCQ
Q-00094658
Q93.

What message will always print if a finally block is executed?

Single Answer MCQ
Q-00094659
Q94.

What is the correct syntax for a try-except-finally block in Python?

Single Answer MCQ
Q-00094660
Q95.

Which of the following is NOT a reason to use a finally block?

Single Answer MCQ
Q-00094661
Q96.

In a case where no except clause catches an exception, which of the following occurs?

Single Answer MCQ
Q-00094662
Q97.

If you have an exception handling structure with try, except, and finally, but no else block, what will happen if no errors occur?

Single Answer MCQ
Q-00094663
Q98.

Which exception will be raised if you try to divide by zero in a try block without handling it?

Single Answer MCQ
Q-00094664
Q99.

Why is it advisable to use finally blocks while working with files?

Single Answer MCQ
Q-00094665
Q100.

Which of the following statements is true regarding the finally clause?

Single Answer MCQ
Q-00094666
Q101.

In a properly structured try-except-finally statement, what is executed last during the program's flow?

Single Answer MCQ
Q-00094667
Q102.

If the finally block contains return statements, what happens?

Single Answer MCQ
Q-00094668
Q103.

What output can you expect from this segment of code if the denominator input is invalid?

Single Answer MCQ
Q-00094669

📖 PYQs Made Easy

Solve previous year CBSE questions to prepare like a topper.

Edzy mobile app