Deck 8: Graphical User Interrfaces

ملء الشاشة (f)
exit full mode
سؤال
GUI-based programs can be configured to respond to various keyboard events and mouse events.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
GUI-based programs are almost always object-oriented.
سؤال
The font attribute in tkinger.Label is an object imported from tkinter.font.
سؤال
Window components are laid out in the window's three-dimensional grid.
سؤال
The breezypythongui module's IntegerField component is a subclass of the Entry class.
سؤال
In the RGB system, the value #00ff00 represents the color red.
سؤال
By default, a window has an empty title string and is resizable.
سؤال
Command buttons are created and placed in a window in the same manner as labels.
سؤال
In a GUI-based program, the user can usually alter the size of a window by holding the mouse on its lower-left corner and dragging in any direction.
سؤال
The attributes of each window component are actually stored in a list.
سؤال
By default, a newly opened window shrink-wraps around its components and is resizable.
سؤال
GUI-based programs use windows that contain various components, also called window objects or gadgets.
سؤال
A method header looks very different from a function header.
سؤال
The creation of a customized version of an existing class is called subclassing.
سؤال
The values that can be used within the sticky attribute are "T, D, L, R".
سؤال
As a rule of thumb, when you are defining a new class of objects, you should look around for a class that already supports some of the structure and behavior of such objects, and then subclass that class to provide the service you need.
سؤال
A button has a state attribute, which can be set to "enabled" or "disabled".
سؤال
The Tkinter module supports the CMYK color system, but not the RGB color system.
سؤال
Command buttons can display text but not images.
سؤال
The addButton method returns an object of type tkinter.Button.
سؤال
One of the requirements for a breezypythongui-based Python script you're writing is that you be able to use a slider bar for selecting a value from a range of values. What type of window component do you want?

A) EasySlider
B) Scale
C) SlideRule
D) EasyRange
سؤال
In the breezypythongui module, what class provides the basic functionality for any window, such as the command buttons in the title bar?

A) WindowFrame
B) ProgFrame
C) BreezyFrame
D) EasyFrame
سؤال
What two items are included in the class header of a class defined in Python? (Choose two.)

A) The class name, conventionally capitalized.
B) The class arguments.
C) The list of one or more parent classes.
D) The required parameters.
سؤال
Other than specifying key values when performing the method call to EasyFrame, what can you use to change a window's attributes?

A) You can overload the class and create an identical class.
B) You can utilize the attribute dictionary.
C) You can pass a tuple to the class constructor.
D) You can use the setDefaults() method.
سؤال
What kind of statement can be used to attempt a graceful recovery from an exception?

A) attempt-fail statement
B) if-else statement
C) try-except statement
D) test-succeed statement
سؤال
Lists of strings can be displayed in list boxes.
سؤال
What is NOT one of the more important attributes of a window?

A) The title string.
B) The width and height in pixels.
C) The resizability of the window.
D) The terminal prompt.
سؤال
A GUI-based program displays a window that contains various components, also known by what specific term?

A) widgets
B) gadgets
C) sprockets
D) doodads
سؤال
In order to allow a program to respond to a button click, the programmer must set the button's "response" attribute.
سؤال
Programming that is tied to user-generated actions, such as mouse clicks, is known as what type of programming?

A) user-driven programming
B) event-driven programming
C) access-driven programming
D) object-oriented programming
سؤال
What two keyword arguments can be used to force a horizontal and/or vertical spanning of grid positions? (Choose two.)

A) gridspan
B) rowspan
C) columnspan
D) gridlock
سؤال
The values of an object's instance variables make up its state.
سؤال
What is the "self" parameter utilized for in a class definition block?

A) It is used within the class and method definitions to call other methods on the same object, or to access that object's variables or data.
B) It is used to define the scope of the class in relevance to the rest of the program.
C) It is used to tell the Python virtual machine that the class is locally significant in the particular module or script it is defined.
D) It is used as a shortcut rather than typing out the module name, parent classes, and subclass to which the class belongs.
سؤال
An entry field is a box in which the user can position the mouse cursor and enter a number or a single line of text.
سؤال
What is the name of the standard GUI module for Python?

A) tkinter
B) PyQt5
C) breezypythongui
D) Kivy
سؤال
What happens when you make a new class a subclass of another class?

A) The new class inherits the attributes and behaviors defined in the parent class.
B) The new class becomes subjugated to the parent class, preventing the override of class values.
C) The new class becomes a copy of the ancestor class, and functions under the ancestor class's namespace.
D) The ancestor class and the new class both become global in scope.
سؤال
When using the EasyFrame class to create a window, what method specifically is used to set up any window components to display in the window?

A) __name__
B) __window__
C) __main__
D) __init__
سؤال
In a GUI-based program, what are labels supposed to do?

A) They define the title name of the program that is running.
B) They are boxes within which a program can accept input.
C) They are text elements that describe inputs and outputs.
D) They interactive elements in the program that can be used for selections.
سؤال
GUI-based programs utilize file dialogs in order to allow the user to browse a computer's file system.
سؤال
What EasyFrame method is used to specify if a window is resizable or not?

A) setEnableResize()
B) chgResize()
C) setWindowAttrib()
D) modWindowSize()
سؤال
What attribute can be used to override the default alignment of a window component?

A) align
B) sticky
C) target
D) orientation
سؤال
What are the two functions available in the tkinter.filedialog module used to support file access in a GUI program?

A) askopenfileaccess
B) askfilesystemaccess
C) asksaveasfilename
D) askopenfilename
سؤال
In GUI terminology, what is the name used to describe a rectangular window component with its own grid that is useful for organizing other window components?

A) layout
B) superframe
C) panel
D) combo frame
سؤال
What scenario would be ideal for the use of a prompter box?

A) You require a GUI element that restricts a user to a single choice of items out of a group of items.
B) You require a GUI element to display an error message upon incorrect input.
C) You require a GUI element to prompt for a user's text input.
D) You require a GUI element to allow a large amount of text to be entered by the user.
سؤال
How can you associate a keyboard event and an event-handling method with a widget?

A) You must name the event-handling method "onPress_".
B) You must use the bind method, which expects a string containing a key event.
C) You must map a shortcut in the host operating system to run the script with a specific argument.
D) You must define the key's event in a YAML-based configuration file.
سؤال
What argument can be specified to the two file dialog functions in order to specify the available file types that can be used?

A) defaultextension
B) filetypes
C) fileformat
D) filedata
سؤال
In the RGB system, what hexadecimal value represents the color black?

A) #000000
B) #ffffff
C) #ff00ff
D) #00ffff
سؤال
What class in the breezypythongui module provides a scrollable box for the display and selection of items?

A) EasyTextField
B) TextArea
C) EasyListbox
D) EasyIntegerField
سؤال
What scenario would be ideal for the use of a check button?

A) You require a GUI element that restricts a user to a single choice of items out of a group of items.
B) You require a GUI element to display an error message upon incorrect input.
C) You require a GUI element to prompt for a user's text input.
D) You require a GUI element that can be grouped with other elements that can be selected at the same time.
سؤال
When passing color values to the tkinter module in hexadecimal, what hex string represents the color red?

A) #ff0000
B) #00ff00
C) #0000ff
D) #ff00ff
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 8: Graphical User Interrfaces
1
GUI-based programs can be configured to respond to various keyboard events and mouse events.
True
2
GUI-based programs are almost always object-oriented.
True
3
The font attribute in tkinger.Label is an object imported from tkinter.font.
True
4
Window components are laid out in the window's three-dimensional grid.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
The breezypythongui module's IntegerField component is a subclass of the Entry class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
In the RGB system, the value #00ff00 represents the color red.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
By default, a window has an empty title string and is resizable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
Command buttons are created and placed in a window in the same manner as labels.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
In a GUI-based program, the user can usually alter the size of a window by holding the mouse on its lower-left corner and dragging in any direction.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
The attributes of each window component are actually stored in a list.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
By default, a newly opened window shrink-wraps around its components and is resizable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
GUI-based programs use windows that contain various components, also called window objects or gadgets.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
A method header looks very different from a function header.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
The creation of a customized version of an existing class is called subclassing.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
The values that can be used within the sticky attribute are "T, D, L, R".
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
As a rule of thumb, when you are defining a new class of objects, you should look around for a class that already supports some of the structure and behavior of such objects, and then subclass that class to provide the service you need.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
A button has a state attribute, which can be set to "enabled" or "disabled".
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
The Tkinter module supports the CMYK color system, but not the RGB color system.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
Command buttons can display text but not images.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
The addButton method returns an object of type tkinter.Button.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
One of the requirements for a breezypythongui-based Python script you're writing is that you be able to use a slider bar for selecting a value from a range of values. What type of window component do you want?

A) EasySlider
B) Scale
C) SlideRule
D) EasyRange
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
In the breezypythongui module, what class provides the basic functionality for any window, such as the command buttons in the title bar?

A) WindowFrame
B) ProgFrame
C) BreezyFrame
D) EasyFrame
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
What two items are included in the class header of a class defined in Python? (Choose two.)

A) The class name, conventionally capitalized.
B) The class arguments.
C) The list of one or more parent classes.
D) The required parameters.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
Other than specifying key values when performing the method call to EasyFrame, what can you use to change a window's attributes?

A) You can overload the class and create an identical class.
B) You can utilize the attribute dictionary.
C) You can pass a tuple to the class constructor.
D) You can use the setDefaults() method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
What kind of statement can be used to attempt a graceful recovery from an exception?

A) attempt-fail statement
B) if-else statement
C) try-except statement
D) test-succeed statement
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
Lists of strings can be displayed in list boxes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
What is NOT one of the more important attributes of a window?

A) The title string.
B) The width and height in pixels.
C) The resizability of the window.
D) The terminal prompt.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
A GUI-based program displays a window that contains various components, also known by what specific term?

A) widgets
B) gadgets
C) sprockets
D) doodads
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
In order to allow a program to respond to a button click, the programmer must set the button's "response" attribute.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
Programming that is tied to user-generated actions, such as mouse clicks, is known as what type of programming?

A) user-driven programming
B) event-driven programming
C) access-driven programming
D) object-oriented programming
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
What two keyword arguments can be used to force a horizontal and/or vertical spanning of grid positions? (Choose two.)

A) gridspan
B) rowspan
C) columnspan
D) gridlock
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
The values of an object's instance variables make up its state.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
What is the "self" parameter utilized for in a class definition block?

A) It is used within the class and method definitions to call other methods on the same object, or to access that object's variables or data.
B) It is used to define the scope of the class in relevance to the rest of the program.
C) It is used to tell the Python virtual machine that the class is locally significant in the particular module or script it is defined.
D) It is used as a shortcut rather than typing out the module name, parent classes, and subclass to which the class belongs.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
An entry field is a box in which the user can position the mouse cursor and enter a number or a single line of text.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
What is the name of the standard GUI module for Python?

A) tkinter
B) PyQt5
C) breezypythongui
D) Kivy
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
What happens when you make a new class a subclass of another class?

A) The new class inherits the attributes and behaviors defined in the parent class.
B) The new class becomes subjugated to the parent class, preventing the override of class values.
C) The new class becomes a copy of the ancestor class, and functions under the ancestor class's namespace.
D) The ancestor class and the new class both become global in scope.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
When using the EasyFrame class to create a window, what method specifically is used to set up any window components to display in the window?

A) __name__
B) __window__
C) __main__
D) __init__
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
In a GUI-based program, what are labels supposed to do?

A) They define the title name of the program that is running.
B) They are boxes within which a program can accept input.
C) They are text elements that describe inputs and outputs.
D) They interactive elements in the program that can be used for selections.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
GUI-based programs utilize file dialogs in order to allow the user to browse a computer's file system.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
What EasyFrame method is used to specify if a window is resizable or not?

A) setEnableResize()
B) chgResize()
C) setWindowAttrib()
D) modWindowSize()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
What attribute can be used to override the default alignment of a window component?

A) align
B) sticky
C) target
D) orientation
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
What are the two functions available in the tkinter.filedialog module used to support file access in a GUI program?

A) askopenfileaccess
B) askfilesystemaccess
C) asksaveasfilename
D) askopenfilename
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
In GUI terminology, what is the name used to describe a rectangular window component with its own grid that is useful for organizing other window components?

A) layout
B) superframe
C) panel
D) combo frame
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
What scenario would be ideal for the use of a prompter box?

A) You require a GUI element that restricts a user to a single choice of items out of a group of items.
B) You require a GUI element to display an error message upon incorrect input.
C) You require a GUI element to prompt for a user's text input.
D) You require a GUI element to allow a large amount of text to be entered by the user.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
How can you associate a keyboard event and an event-handling method with a widget?

A) You must name the event-handling method "onPress_".
B) You must use the bind method, which expects a string containing a key event.
C) You must map a shortcut in the host operating system to run the script with a specific argument.
D) You must define the key's event in a YAML-based configuration file.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
What argument can be specified to the two file dialog functions in order to specify the available file types that can be used?

A) defaultextension
B) filetypes
C) fileformat
D) filedata
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
In the RGB system, what hexadecimal value represents the color black?

A) #000000
B) #ffffff
C) #ff00ff
D) #00ffff
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
What class in the breezypythongui module provides a scrollable box for the display and selection of items?

A) EasyTextField
B) TextArea
C) EasyListbox
D) EasyIntegerField
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
What scenario would be ideal for the use of a check button?

A) You require a GUI element that restricts a user to a single choice of items out of a group of items.
B) You require a GUI element to display an error message upon incorrect input.
C) You require a GUI element to prompt for a user's text input.
D) You require a GUI element that can be grouped with other elements that can be selected at the same time.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
When passing color values to the tkinter module in hexadecimal, what hex string represents the color red?

A) #ff0000
B) #00ff00
C) #0000ff
D) #ff00ff
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.