wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

TKinter Quiz

Total questions: 12

Worksheet time: 6mins

Name
Class
Date
1.

What is Tkinter in Python?

a)

A database library

b)

A GUI programming library

c)

A web framework

d)

A game engine

2.

Which class is used to create the main window in Tkinter?

a)

Window

b)

Frame

c)

Mainloop

d)

Tk

3.

How many Tk() objects should a Tkinter application have?

a)

One

b)

Two

c)

One for each widget

d)

Any number

4.

Which statement is TRUE about a window in Tkinter?

a)

It is a widget inside a frame

b)

It cannot contain widgets

c)

It is the top-level container of the GUI

d)

It is created using Frame()

5.

Which of the following is a Tkinter widget?

a)

mainloop()

b)

geometry()

c)

Button

d)

config()

6.

What is the purpose of the Button widget?

a)


Perform an action when clicked

b)

Take text input

c)

Draw shapes

d)

Display text

7.

What happens if a widget is created but not packed?

a)

It appears at the center

b)

It causes an error

c)

It appears automatically

d)

It does not appear on the window

8.

Why are Frames used in Tkinter?

a)


To draw graphics

b)

To group and organize widgets

c)

To handle keyboard events

d)

To create pop-up windows

9.

Where can a Frame exist in a Tkinter application?

a)

Only inside another frame

b)

Only inside the main window

c)

Outside the window

d)

Inside a window or another frame

10.

What is the role of mainloop() in a Tkinter program?

a)

Keeps the GUI running and waits for events

b)

Packs widgets

c)

Closes the window

d)

Creates widgets

11.

What will happen if mainloop() is not written?

a)

Program runs normally

b)

Widgets appear but do not respond

c)

GUI window appears briefly and closes

d)

Code gives syntax error

12.

Tkinter programs are mainly based on which concept?

a)

Sequential execution

b)

Event-driven programming

c)

Multithreading

d)

Compiler design