tkinter - How to divide two user inputs? Python 3.3 -
I am creating a simple countdown clock at this level I have my GUI (I have already programmed) I want to take two user entries and want to do the Every time I do this I get type code: type / unsupported operand type (s) for: 'intervara' and 'interver' Here is the question in question: Any help will be highly appreciated! As with this example, use You probably want to convert to the first float if you are on Python 2 Or it will only complete the integer division. As a result, you change the result for the label into text This line needs to be changed value_a /
value_b operation.
def mineTime (): mtime = ueAV / ueMY label_mtime = Label (text = mtime, fg = 'white', bg = 'gray'). Pack () Return # GUI object mGui = Tk () ueAV = IntVar () ueMY = IntVar ()
IntVar.get () method < / P>
mtime = ueAV.get () / ueMY.get ()
mtime = float (ueAV.get ()) / UeMY.get ()
Comments
Post a Comment