Olete.in
Articles
Mock Tests
🧪 Python MCQ Quiz Hub
Python MCQS - GUI in python
Choose a topic to test your knowledge and improve your Python skills
1. Which of the following tool provides a GUI in python
Numpy
Tkinter
Scipy
Opencv
2. Tkinter tool in python provide the
Database
OS commands
GUI
All of the above
3. GUI stands for
Graph user interaction
Global user interaction
Graphical user interface
Graphical user interaction
4. What is widget in Tkinter GUI in python
That will display on the screen
That will work in background
Both of the above
None of the above
5. Which of the following is clickable in GUI programming ?
Button
Checkbutton
Lable
1 and 2
6. How we import a tkinter in python program ?
import tkinter
import tkinter as t
from tkinter import *
All of the above
7. Which of the following is not correct way to import the tkinter in program ?
import tkinter from *
import tkinter as t
import tkinter as p
All of the above
8. From which keyword we import the Tkinter in program?
call
from
import
All of the above
9. Which widget are used to get the data from the user ?
Button
Label
Entry
None of the above
10. What is the use of the Entry widget in tkinter python ?
Display text on the window
Display Check button on window
Create a user data entry field
All of the above
11. what is Tk() in tkinter python ?
It is function
It is constructor
It is widget
All of the above
12. Essential thing to create a window screen using tkinter python?
call tk() function
create a button
To define a geometry
All of the above
13. How we install tkinter in system ?
pip install python
tkinter install
pip install tkinter
tkinter pip install
14. Which of the following command are used to install the tkinter ?
pip install Tkinter
pip install python tkinter
pip install tkinter python
None of the above
15. Which of the correct way to set the geometry of the window ?
geometry(x,y)
geometry(300x400)
geometry(300,400)
None of the above
16. To hold the screen what we use ?
mainloop() function
pause() function
Stop() function
None of the above
17. What is the use of the mainloop() in Python Tkinter ?
To create a window screen
To Destroy the window screen
To Hold the window Screen
None of the above
18. Which of th following is used to call a function by the Button widget in tkinter python ?
call
cammand
contact
All of the above
19. Which of the following function are used to get the data from the Entry field in Python Tkinter ?
get()
Gettext()
Getdata()
All of the above
20. To get the multiple line user data, which widget we use ?
Entry
Text
Both of the above
None of the above
21. For user Entry data, which widget we use in tkinter ?
Entry
Text
Both of the above
None of the above
22. title() is used for
give a title name to the window
give a title name to the Button
give a title name to the Widet
None of the above
23. What is the right way to set the title of the window ?
title(win,mytitle)
win.title(mytitle)
title(mytitle).win
None of the above
24. Which of the following is used to put the widget at the screen ?
pack()
place()
grid()
All of the above
25. What is the use of the pack() function for the tkinter widget ?
To pack the widget on the screen
To define a size of the widget
To perform a task by a widget
To destroy the widget
26. How pack() function works on tkinter widget ?
According to x,y coordinate
According to row and column vise
According to left,right,up,down
None of the above
27. How the place() function put the widget on the screen ?
According to x,y coordinate
According to row and column vise
According to left,right,up,down
None of the above
28. How the grid() function put the widget on the screen ?
According to x,y coordinate
According to row and column vise
According to left,right,up,down
None of the above
29. What is the use of the place() function in tkinter Python ?
To put the widget on the screen
To put the widget on the Button
To put the widget on the background
To destroy the widget
30. What we use to change the back ground color any widget ?
background
fg
bg
bground
31. For what purpose, the bg is used in Tkinter widget ?
To change the direction of widget
To change the size of widget
To change the color of widget
To change the background of widget
32. fg in tkinter widget is stands for ?
foreground
background
forgap
None of the above
33. To change the color of the text in the Button widget, what we use ?
bg
fg
color
cchng
34. Config() in Python Tkinter are used for
destroy the widget
place the widget
change property of the widget
configure the widget
35. To change the property of the widget after the declaration of widget, what e use ?
mainloop() function
config() function
pack() function
title() function
36. What is the correct way to use the config() function in tkinter ?
config(object,property)
object.config(property)
config(property)
object.property
37. Screen inside another screen is possible by creating
Another window
Frames
Buttons
Labels
38. What is the Syntax to create a Frame ?
Frame(window,options)
win.frame(options)
Both of the above
None of the above
39. In which of the following field, we can put our Button?
Window
Frame
Label
All of the above
40. Creating line are come in which type of thing ?
GUI
Canvas
Both of the above
None of the above
41. Which of the following is correct ?
GUI is the part of the canvas
canvas is the part of the GUI
Both of the above
None of the above
42. Which of the following we can draw using canvas in tkinter ?
Line
Rectangle
oval
All of the above
43. use of the angle attribute are on which widget ?
line
text
Button
All of the above
44. Minimum number of argument we require to pass in a function to create a line ?
2
4
6
8
45. It is possible to draw a circle directly in Tkinter canvas ?
Yes
No
No(but possible by oval)
None of the above
46. To delete any widget from the screen which function we use ?
stop()
delete()
destroy()
break()
47. What is the correct syntax of destroy in tkinter ?
destroy(object)
object.destroy()
object(destroy)
delete(object)
48. Which of the following we can able to delete using destroy() function ?
Button
Label
Frame
All of the above
49. Minimum number of argument we pass in a function to create a rectangle using canvas tkinter ?
2
4
6
5
50. Correct way to draw a line in canvas tkinter ?
line()
canvas.create_line()
create_line(canvas)
None of the above
Submit