ui.py

from tkinter import *

THEME_COLOR = "#375362"

class QuizInterface:

    def __init__(self):
        self.window = Tk()
        self.window.title("Quizzler")
        self.window.config(padx=20, pady=20, bg=THEME_COLOR)

        self.canvas = Canvas(width=300, height=250, bg="white")
        self.question_text = self.canvas.create_text(
            150,
            125,
            text="some question",
            fill=THEME_COLOR,
            font=("Ariel", 20, "italic"))
        self.canvas.grid(column=0, row=1, columnspan=2, pady=20)

        self.score = Label(text="Score=0", fg="white", bg=THEME_COLOR, font=("Ariel", 20))
        self.score.grid(column=1, row=0)
        self.score.config(pady=20)

# Almost everything that I've created inside my init, I've given it the 'self.'
# And remember from our lessons on OOP, this turns this into a property which can be accessed anywhere in the class.
# Now, some other things like the true image and the false image,
# I've not done that for because we're not going to use it anywhere else other than to set up our button right here.
        
        true_image = PhotoImage(file="images/true.png")
        false_image = PhotoImage(file="images/false.png")
        self.true_button = Button(image=true_image, highlightthickness=0)
        self.false_button = Button(image=false_image, highlightthickness=0)
        self.true_button.grid(column=0, row=2, pady=20)
        self.false_button.grid(column=1, row=2, pady=20)

        self.window.mainloop()