app = Tk() # creat a tkinter application window called "app"

app.title("TVN Game Show")
app.geometry("300x100+200+100")

b1 = Button(app, text = "Correct!", width = 10, command = play_correct_sound)
b1.pack(side = "left", padx = 10, pady = 10)

In the above code, I understand that "app" is my TK() object. But what is the need and purpose of having it as the first parameter of Button? I feel like I'M asking to many simple questions but my book is doing a rather poor job of explaining all the code.

Button is placed in the app window directly. Generally it makes sense to prepare one frame first and put Button in that frame.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.