So im trying to write my code to basically make a game of even and odd and im trying to write a command with if that if the person writes pair that they get a point if the next number is pair but im not sure what to write under the if to get it to work?
I dont know what to try but all i know is that its not working?
def pigeNumero():
if len(chiffre)>=1:
position = random.randint(0,len(chiffre))
lblNumero['text'] = "Le numéro est: {0}".format(chiffre[position])
if (chiffre % 2 == 0)(reponse = Pair):
pointT = pointT + 1
print("Bravo! Tu as {0} point(s)".format(pointT))
else :
pointO = pointO + 1
print("Désolé. L'ordi à {0} point(s)".format(pointO))
for i in range(1,99):
chiffre.append(i)
reponse = tk.StringVar
chkbtnPair = tk.Checkbutton(fenetre)
chkbtnPair['text'] = "Pair"
chkbtnPair['width'] = "15"
chkbtnPair['variable'] = reponse
chkbtnPair['font'] = "Arial 15"
chkbtnPair.select
chkbtnPair.pack(pady=5)
chkbtnImpair = tk.Checkbutton(fenetre)
chkbtnImpair['text'] = "Impair"
chkbtnImpair['width'] = "15"
chkbtnImpair['variable'] = reponse
chkbtnImpair['font'] = "Arial 15"
chkbtnImpair.select
chkbtnImpair.pack(pady=5)