mardi 30 mars 2021

TypeError: '<' not supported between instances of 'function' and 'int' | Python 3.7.9 tkinter

I´m trying to fix this but I don´t know how. Any advice?

I also tried to convert it with the "def conerter():" but it doesn´t worked out yet..

Error:

TypeError: '<' not supported between instances of 'function' and 'int' 

show´s up the whole time....

from tkinter import *
# ------------------------------------------------------------------------------
#                                   GUI
# ------------------------------------------------------------------------------
main = Tk()
main.title("Faltschachtelrechner")
main.geometry("900x500")
main.configure(background='#FFFFFF')
# --------------------------------------------------------------------------------
#                                   Logic
# --------------------------------------------------------------------------------
def converter():
    try:
        int(nenngewicht.get())
        answer.config(text="true")
        
    except ValueError:
        answer.config(text="false")

#Input Nenngewicht
nenngewicht = Entry(main)
nenngewicht.pack(pady=10)


if converter < 100 or converter > 1000:
    fpvo = 0
if fpvo == 0:
    fpvo = 2

Aucun commentaire:

Enregistrer un commentaire