Skip to content
Advertisement

Tag: python-3.x

Entry not updating tkinter python

Im trying to make a rock paper scissors game using the python module tkinter to create a window with an input box. However im struggling to get the entry box to update to another value everytime i press the button. What im struggling with i.e if I was to write Rock as an input (assume computer response is always 0):

Can this for loop be vectorized?

Can this for loop be vectorized maybe by expanding dimensions and then collapsing it? I got the hint from somewhere that I can replace with Answer It can be vectorized by expanding dimensions as you suggested. I think the secret sauce is using np.tril to zero out terms in the progression before summing:

Making child class inherit methods from parent in tkinter

I’m new to Tkinter and OOP. I’ve been trying to make child class inherit some methods from parent class because I’d have repeated code if I didn’t do it like that. But I’ve stumbled on a problem, caused probably by my limited knowledge of Tkinter and OOP. Here is my code: (it’s really simplified, but it is enough to solve

Advertisement