Which widget would you use to display a simple piece of text that the user cannot edit?
Label
Which property allows you to change the background color of a widget?
bg
Which widget provides a dropdown menu for users to select one option from a list?
Combobox
If a button says "OFF," which method do you use to change its text to "ON" after it is clicked?
.config() or .configure()
Which geometry manager allows you to place widgets in specific rows and columns?
grid
If you want a user to type in a long paragraph or multiple lines of text, which widget is best?
Text
If you want to add space inside a widget (between the text and the border), what do you use?
pady, padx
The Scale widget is used to select a number. What is the default orientation of a Scale?
Vertical
What command sets the text that appears at the very top bar of the window (next to the exit button)?
window.title("My Game")
What happens if you forget to use .pack() or .grid() after creating a widget?
The widget will not appear on the screen
What keyword argument do you use in a Button to tell it which function to run when clicked?
command
To change the font size of a Label to 20, you pass a tuple to the font argument. What does that tuple look like?
("Arial", 20)
When using a Combobox, which property is used to define the list of options the user can see?
values
If you have 3 buttons in a row and want the middle one to be wider, which property do you change?
width
In .grid(), if you want a widget to take up the space of two columns, which argument do you use?
columnspan=2
To change the text on an existing Label named my_label, you can use the config method. Write the code line.
my_label.config(text="New Text")
Which configuration property changes the color of the text itself?
fg
Instead of a regular Python string, Tkinter has its own special variable type that automatically updates labels when changed. What is it called?
StringVar, Default value for combobox
If you place two widgets in the exact same row and column in a grid, what happens?
They overlap/stack on top of each other
What is a lambda function used for in a Button command?
To pass information/arguments to a function)
The Entry widget has a specific method to get the text typed by the user. What is the name of that method?
.get()
If you want a Combobox to be "Read Only" so users can't type their own random text into it, what do you set the state to?
readonly
To clear all the text currently inside an Entry widget named user_input, what line of code do you use?
user_input.delete(0, 'end')
How do you make a Scale go from 1 to 10 instead of the default 0 to 100?
from_=1, to=10
Which library and specific terminal command would you use to turn your .py game file into a single, clickable .exe file that opens without a boring console window in the background?
PyInstaller