60.4k views
4 votes
Complete the code to change the label to black text on a yellow background. w = tk.Label(root, text="Movies", ="yellow", ="black")

User RONOLULU
by
7.6k points

1 Answer

4 votes

Answer:

To change the label to black text on a yellow background, you need to specify the foreground and background colors using the fg and bg attributes, respectively. Here's the updated code:

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

User Samya
by
8.6k points