1/18
This set of flashcards covers key concepts in exception handling in Python and the Tkinter library, providing definitions for common exceptions and essential GUI components.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Exception Handling
A programming construct that allows a program to gracefully handle unexpected events without crashing.
ValueError
Raised when a function receives an argument of the correct type but an inappropriate value.
TypeError
Raised when an operation or function is applied to an object of inappropriate type.
KeyError
Raised when a dictionary key is not found.
IndexError
Raised when a sequence subscript is out of range.
FileNotFoundError
Raised when a file or directory is requested but cannot be found.
ZeroDivisionError
Raised when the second argument of a division or modulo operation is zero.
AttributeError
Raised when an attribute reference or assignment fails.
ImportError
Raised when an import statement fails to find the module definition.
try…except Block
A block used in Python to handle exceptions where code that may cause an exception is placed in a try block followed by an except block to catch exceptions.
finally Block
A block that is always executed after the try block, regardless of whether an exception was raised.
assertionError
An error raised when an assert condition is false.
RuntimeError
A general runtime error that occurs during program execution.
Tkinter
The standard GUI (Graphical User Interface) library for Python.
Label Widget
A widget used to display text or images in a Tkinter application.
Button Widget
A widget that is used to trigger actions when clicked.
Entry Widget
A single-line text input box in a Tkinter application.
Frame Widget
A container used to group other widgets.
PhotoImage
Tkinter class for managing images.