NEW
Font size
WorksheetsTKinter Quiz
Total questions: 12
Worksheet time: 6mins
What is Tkinter in Python?
A database library
A GUI programming library
A web framework
A game engine
Which class is used to create the main window in Tkinter?
Window
Frame
Mainloop
Tk
How many Tk() objects should a Tkinter application have?
One
Two
One for each widget
Any number
Which statement is TRUE about a window in Tkinter?
It is a widget inside a frame
It cannot contain widgets
It is the top-level container of the GUI
It is created using Frame()
Which of the following is a Tkinter widget?
mainloop()
geometry()
Button
config()
What is the purpose of the Button widget?
Perform an action when clicked
Take text input
Draw shapes
Display text
What happens if a widget is created but not packed?
It appears at the center
It causes an error
It appears automatically
It does not appear on the window
Why are Frames used in Tkinter?
To draw graphics
To group and organize widgets
To handle keyboard events
To create pop-up windows
Where can a Frame exist in a Tkinter application?
Only inside another frame
Only inside the main window
Outside the window
Inside a window or another frame
What is the role of mainloop() in a Tkinter program?
Keeps the GUI running and waits for events
Packs widgets
Closes the window
Creates widgets
What will happen if mainloop() is not written?
Program runs normally
Widgets appear but do not respond
GUI window appears briefly and closes
Code gives syntax error
Tkinter programs are mainly based on which concept?
Sequential execution
Event-driven programming
Multithreading
Compiler design
