wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

23rd July

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

What does CTk() do in CustomTkinter?

a)

Creates a text box

b)

Creates a button

c)

Initializes the main application window

d)

Exits the GUI application

2.

Which method is used to set the window size in CustomTkinter?

a)

setsize()

b)

resize()

c)

geometry()

d)

dimensions()

3.

What is the purpose of root.mainloop() in a GUI application?

a)

It runs the GUI in a loop until the window is closed

b)

It destroys the GUI

c)

It creates a new window

d)

It packs all widgets

4.

Which function is used to make a CTk window non-resizable?

a)

geometry(False)

b)

resizable(False, False)

c)

resize(0, 0)

d)

fixsize()

5.

What does root.title("My App") do?

a)

Sets the heading of a label

b)

Adds a title to the main window

c)

Adds a subtitle to the app

d)

Creates a title bar button

6.

What is the purpose of the pack() method?

a)

Removes a widget

b)

Positions widgets in the window

c)

Closes the application

d)

Saves the window layout

7.

Which function returns the current value of a widget’s property?

a)

config()

b)

update()

c)

cget()

d)

getproperty()

8.

How do you change the background color of a CTkButton?

a)

button.change_color("blue")

b)

button.bg("blue")

c)

button.configure(fg_color="blue")

d)

button.set(fg_color="blue")

9.

Which method is used to modify the text in a CTkTextbox?

a)

update()

b)

replace()

c)

configure()

d)

delete()

10.

Which of the following can be used to contain other widgets?

a)

CTkFrame

b)

CTkTextbox

c)

CTkButton

d)

CTkWindow

11.

Which widget allows the user to enter multiple lines of text?

a)

CTkButton

b)

CTkEntry

c)

CTkTextbox

d)

CTkLabel

12.

What is the default layout manager used if pack() is not called?

a)

place

b)

grid

c)

pack

d)

None (widget won’t be visible)

13.

root = customtkinter.CTk() creates:

a)

A frame

b)

A button

c)

A window

d)

A label

14.

How do you center a widget in a pack layout?

a)

pack(side="center")

b)

pack(anchor="center")

c)

pack()

d)

pack(padx=10, pady=10)

15.

What happens if you forget to call mainloop()?

a)

The window will still open

b)

Widgets will work as expected

c)

The GUI won't appear

d)

Nothing changes

16.

Which of the following is NOT a valid argument in geometry()?

a)

"300x300"

b)

"500x400+50+100"

c)

"width:300, height:400"

d)

"1024x768"

17.

What is CTkFrame mostly used for?

a)

Text input

b)

Holding other widgets

c)

Button creation

d)

Resizing the window

18.

What will eval("2 + 3 * 4") return?

a)

"2 + 3 * 4"

b)

14

c)

20

d)

11

19.

What does the command attribute of a CTkButton do?

a)

Sets the button color

b)

Calls a function when the button is clicked

c)

Changes button size

d)

Displays text on the button

20.

What does CTkButton(master, state="disabled") do?

a)

Makes the button invisible

b)

Greys out and disables the button

c)

Hides the text

d)

Enables button click