How to assign values to checkbuttons and use them to calculate a score? How to assign values to checkbuttons and use them to calculate a score? tkinter tkinter

How to assign values to checkbuttons and use them to calculate a score?


Your question_5_VarX variables are of type IntVar, so they will not be True in any case. You should check their value instead, using the get() method. Note that the value will be an int, but you can use it just like a boolean.

if question_5_Var2.get() and question_5_Var3.get() and not question_5_Var1.get():

(You might also want to check that the first answer is not checked.)