Font size
WorksheetsPython 145
Total questions: 11
Worksheet time: 11mins
Choose the correct statements
Python is a high level programming language
Easy to read
Simple to implement
Hard to implement
It is an open source
Spyder is a
Python editor
Python library
both
Tkinter is
a standard Python library
used to create easy and user friendly User interfaces
both
a='100';
print(type(a));
<class 'int'>
<class 'list'>
<class 'str'>
B = [1, 2, 3, "a", 'bat']
print(type(B))
<class 'int'>
<class 'str'>
<class 'list'>
To import/load the Tkinter library and its pacakges/modules from that library the code is
from tkinter import *
In the above code * denotes
all the modules of tkinter library
any specific module
selected modules
function to name the window is?
heading()
title()
to set dimensions for root window of width 400 and height 300 ?
root.geometry(300,400)
root.dimensions(400,300)
root.geometry(400,300)
root.size(300,400)
root.mainloop()
method on the main window which we execute when we want to run our application
loops forever
waits for events until the user exits the program
button1 = Button(root, text="Hello", command=xyz);
text represents the name on the button
text represents the function to be called onclick of button
command represents the action to be performed on button click
xyz is the name of the function
name = "Purple"
label_name['text'] = name
name is a variable which holds the value purple
label_name is a variable which gets the value of the name variable
label_name is a label which gets updated with the value of name assigned to it
