Apr-22-2019, 12:18 PM
The function
In the following
you can make another function for command to call that calls
radsa
has been made to take 3 arguments guessesTaken, randnummer, gæt
In the following
l = Button(r, text="gæt2", command=radsa, compound=CENTER)makes it call radsa when the button is pressed but it will call it with no arguments
you can make another function for command to call that calls
radsa
with the appropriate argumentsdef call_radsa: guessesTaken = #code for this randnummer = #code for this gæt = #code for this radsa(guessesTaken, randnummer, gæt)
l = Button(r, text="gæt2", command=call_radsa, compound=CENTER)