ThatQuiz Test Library Take this test now
ooprog
Contributed by: Laong
  • 1. To create a main window, and to change the name of the window, you can change the className to the desired one.
A) Jk()
B) Pk()
C) Tk()
  • 2. is used when your application is ready to run
A) __name__
B) mainloop()
C) whileloop()
  • 3. It refers to the display box where you can put any text or image which can be updated any time as per the code.
A) entry
B) label
C) text
  • 4. To add a button in your application, this widget is used
A) button
B) radiobutton
C) click
  • 5. It is used to input the single-line text entry from the user
A) Messagebox
B) Textbox
C) Entry
  • 6. To select any number of options by displaying a number of options to a user as toggle buttons
A) checkbutton
B) clickbutton
C) radiobutton
  • 7. It is used to offer multi-choice option to the user. It offers several options to the user and the user has to choose one option.
A) clickbutton
B) radiobutton
C) checkbutton
  • 8. It offers a list to the user from which the user can accept any number of options
A) textboxt
B) openbox
C) listbox
  • 9. It refers to the slide controller which will be used to implement listed widgets.
A) controlbar
B) scrollbar
C) bindbar
  • 10. It is used to create all kinds of menus used by the application.
A) minu
B) menu
C) manu
  • 11. It is used to provide a graphical slider that allows to select any value from that scale.
A) scroll
B) scale
C) slide
  • 12. This widget is directly controlled by the window manager. It don’t need any parent window to work on.
A) bottomlevel
B) downlevel
C) toplevel
  • 13. It refers to the multi-line and non-editable text. It works same as that of Label.
A) Text
B) Chat
C) Message
  • 14. It is a part of top-down menu which stays on the window all the time.
A) checkbutton
B) menubutton
C) listbutton
  • 15. It is used to draw pictures and other complex layout like graphics, text and widgets.
A) frame
B) canvas
C) canva
  • 16. It is a container widget which is used to handle number of panes arranged in it.
A) Arrangedwindow
B) Widgetwindow
C) Pannedwindow
  • 17. It organizes the widgets in blocks before placing in the parent widget.
A) place()
B) pack()
C) grid()
  • 18. It organizes the widgets in grid (table-like structure) before placing in the parent widget.
A) grid()
B) pack()
C) place()
  • 19. It organizes the widgets by placing them on specific positions directed by the programmer.
A) place()
B) pack()
C) grid()
  • 20. This option is used to control the positioning of the text if the widget has more space than required for the text. The default is anchor=CENTER, which centers the text in the available space.
A) bg
B) anchor
C) height
  • 21. This option is used to set the normal background color displayed behind the label and indicator.
A) bg
B) fg
C) color
  • 22. This option is used to set the vertical dimension of the new frame.
A) width
B) weight
C) height
  • 23. This option is used to set the size of the border around the indicator.
A) bg
B) bd
C) fg
  • 24. It is used to specify what cursor to show when the mouse is moved over the label
A) cursor
B) place
C) anchor
  • 25. This option is used to display a static image in the label widget.
A) picture
B) photo
C) image
  • 26. This option is used to add extra spaces between left and right of the text within the label.
A) pady
B) padx
C) padxy
  • 27. This option is used to add extra spaces between top and bottom of the text within the label.
A) pady
B) padx
C) padxy
  • 28. This option is used to define how to align multiple lines of text. Use LEFT, RIGHT, or CENTER as its values.
A) justify
B) center
C) left
  • 29. This option is used to specify appearance of a decorative border around the label.
A) redesign
B) relive
C) relief
  • 30. is a fundamental concept in Python, empowering developers to build modular, maintainable, and scalable applications.
A) Object Oriented Programming
B) Object Orient Program
C) Objects Orients Programming
  • 31. are blueprints for creating objects.
A) object
B) class
C) room
  • 32. allows a class (child class) to acquire properties and methods of another class (parent class).
A) Abstraction
B) Polymorphism
C) Inheritance
  • 33. allows methods to have the same name but behave differently based on the object’s context.
A) Polymorphism
B) Encapsulation
C) Abstraction
  • 34. is the bundling of data (attributes) and methods (functions) within a class, restricting access to some components to control interactions.
A) Inheritance
B) Encapsulation
C) Abstraction
  • 35. hides the internal implementation details while exposing only the necessary functionality. It helps focus on “what to do” rather than “how to do it.”
A) Polymorphism
B) Abstraction
C) Inheritance
  • 36. is a Python module used for taking inputs with additional validation features and will keep asking the user for text until they enter valid input.
A) PyInputPlus
B) Prompt
C) Input
  • 37. Accepts a numeric value. It takes additional parameters ‘min’, ‘max’, ‘greaterThan’ and ‘lessThan’ for bounds. Returns an int or float.
A) inputInt
B) inputNumber
C) inputNum
  • 38. Accepts a floating-point numeric value. Also takes additional ‘min’, ‘max’, ‘greaterThan’ and ‘lessThan’ parameters. Returns a float.
A) inputNum
B) inputFloat
C) inputInt
  • 39. Accepts a boolean value. Input can be any case-insensitive form of ‘true’/’false’ and ‘T’/’F’. Returns a boolean value.
A) inputBoolean
B) inputBool
C) inputYESNO
  • 40. Accepts a string value. It provides features such as ‘blockRegexes’, ‘timeout’, ‘limit’ etc.
A) inputStr
B) inputChar
C) inputName
  • 41. Accepts an integer value. This also takes additional parameters ‘min’, ‘max’, ‘greaterThan’ and ‘lessThan’ for bounds. Returns an int.
A) inputInt
B) inputStr
C) inputNum
  • 42. Takes a list of strings and accepts one of them as input.
A) inputMenu
B) inputChoice
C) inputChoose
  • 43. it can be marked with letters or numbers, using the ‘lettered’ and ‘numbered’ parameters.
A) inputMenu
B) inputChoose
C) inputChoice
  • 44. Accepts a date in a strftime format. We need to pass this format to the ‘formats’ parameter
A) inputTime
B) inputDate
C) inputTimeDate
  • 45. Accepts ‘yes’/’no’ or ‘y’/’n’ in case-insensitive form. Returns ‘yes’ or ‘no’.
A) inputYESorNO
B) inputTrueFalse
C) inputYesNo
  • 46. parameter’s value as the regex pattern we want to invalidate.
A) yesnoRegexes
B) allowRegexes
C) blockRegexes
  • 47. To create an alias
A) or
B) and
C) as
  • 48. To define a function
A) def
B) func
C) defunc
  • 49. Used with exceptions, what to do when an exception occurs
A) try
B) except
C) else
  • 50. Used with exceptions, a block of code that will be executed no matter if there is an exception or not
A) try
B) except
C) finally
  • 51. A null statement, a statement that will do nothing
A) pass
B) break
C) return
  • 52. To raise an exception
A) raise
B) try
C) up
  • 53. To make a try...except statement
A) finally
B) try
C) except
  • 54. Raised when an error occurs in numeric calculations
A) AttributeError
B) AssertionError
C) ArithmeticError
  • 55. Raised when an index of a sequence does not exist
A) NameError
B) IndexError
C) KeyError
  • 56. Raised when a program runs out of memory
A) NameError
B) MemoryError
C) LookupError
  • 57. Raised when the second operator in a division is zero
A) TypeError
B) ZeroDivisionError
C) ValueError
  • 58. Raised when two different types are combined
A) NameError
B) ValueError
C) TypeError
  • 59. are used to perform common mathematical operations
A) Comparison Operators
B) Arithmetic Operators
C) Assignment Operators
  • 60. are used to compare two values
A) Comparison Operators
B) Assignment Operators
C) Arithmetic Operators
Students who took this test also took :

Created with That Quiz — the site for test creation and grading in math and other subjects.