wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Py Tkinter

Total questions: 10

Worksheet time: 6mins

Name
Class
Date
1.

Which of the following are valid Tkinter widgets? Select all that apply.

a)

WebBrowser

b)

Button

c)

ColorPicker

d)

Entry

e)

Label

2.

from tkinter import *


In the above code * denotes

a)

selected modules

b)

any specific module

c)

all the modules of tkinter library

3.

root.mainloop()

a)

method on the main window which we execute when we want to run our application

b)

loops forever

c)

waits for events until the user exits the program

d)

All the options

4.

button1 = Button(root, text="Hello", command=xyz);


Select all the right explanation for the above line

a)

text represents the name on the button

b)

xyz is the name of the function

c)

text represents the function to be called onclick of button

d)

command represents the action to be performed on button click

5.

__________ is an element of GUI.

a)

Widget

b)

Application

c)

Tkinter

d)

GUI

6.

It is not possible to set the title of the window after creating it

a)

True

b)

False

7.

What extension must you add to the end of a file when saving?

a)

.xls

b)

.pynb

c)

.csv

d)

.py

8.

window.geometry("300x200")

a)

300 is the height and 200 is the width

b)

200 is the height and 300 is the width

9.

Tkinter

a)

the rules that determine how code must be written in order for it to work properly

b)

a Python module that lets you draw shapes by moving a robotic turtle across the screen

c)

The GUI module that Python uses

d)

a series of characters. Strings can contain numbers, letters, or symbols and will have '' around them

10.

Choose the options that are right about Widget

[You can choose all the correct answers]

a)

A part of Tkinter GUI that performs a specific function such as a button or menu

b)

errors caused by incorrect punctuation, spelling and grammar. (e.g. colour instead of color)

c)

a place to store data that can change in a program such as the player's score, health or time. A variable has a name and a value

d)

a universal code used by computers to represent symbols and text characters (e.g. an emoji)