How can a dictionary and if function co-exist without conflicting eachother? (Tkinter)
To solve when you added
elif strength and len(entered_text) < 9: output.delete(0.0, END) output.insert(END, strength)
the earlier code never passes through the first elif statement and therefore never assigns a value to strength and therefore it is referenced before assignment.