wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Tkinter-Frame

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.
In Tkinter, what is a Frame?
a)
A graphical element like a button or label
b)
A container for other widgets
c)
A type of loop
d)
A drawing tool
2.
Which module needs to be imported to use Tkinter in Python?
a)
tk
b)
interface
c)
ui
d)
Tkinter
3.

Ishika, Prisha, and Arnav are having a blast learning Tkinter! How can they create a Frame to add more fun to their GUI?

a)

frame -tk.NewFrame()

b)

frame=tk.create_frame()

c)

frame=tk.Frame()

d)

frame = Frame.create()

4.
What is the purpose of a Frame in Tkinter?
a)
To display images
b)
To create buttons
c)
To group and organize other widgets
d)
To draw shapes
5.
Which geometry manager is commonly used to organize widgets inside a Frame?
a)
Pack
b)
Grid
c)
Place
d)
Layout
6.
Which geometry manager is commonly used to organize widgets within a frame in Tkinter?
a)
Grid
b)
Pack
c)
Stack
d)
Arrange
7.

Avni, Aisha, and Aditi are on a coding adventure in Tkinter. They stumbled upon a tricky problem - how to make a widget disappear from a frame. Can you guide them by choosing the correct option?

a)

widget.remove()

b)

my_frame.remove(widget)

c)

widget.pack_forget()

d)

my_frame.delete(widget)

8.

Anika, Vanya, and Aditi are in a friendly coding battle to showcase their Tkinter skills! Can you guess which attribute is commonly used to adjust the border width of a frame?

a)

border

b)

borderwidth

c)

frame_border

d)

bd

9.

Aanya wants to add some color to her Tkinter frame named my_frame. Which of the following options will help her change the background color to red?

a)

my_frame.bg_color="red"

b)

my_frame.configure(bg="red")

c)

my_frame.background("red")

d)

my_frame.bg("red")

10.

Hey there! Can you tell me why we use a Button in Tkinter?

a)

To trigger an action when clicked

b)

To display an image on the screen

c)

To change the background color of the window

d)

To handle user input