Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

question # 4 dropdown complete the code to change the label to black te…

Question

question # 4
dropdown
complete the code to change the label to black text on a yellow background.
w = tk.label(root, text=\movies\, =\yellow\, =\black\)

Explanation:

Step1: Identify background - color parameter

In Tkinter, the background color of a label is set using the bg parameter. So the first blank should be bg.

Step2: Identify foreground - color parameter

The text color (foreground color) of a label in Tkinter is set using the fg parameter. So the second blank should be fg.

Answer:

w = tk.Label(root, text="Movies", bg="yellow", fg="black")