Why isn't working properly??? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Why isn't working properly???

from tkinter import * root = Tk() input = Entry(root) input.pack() def state(): if len(input.get())==0: return "disable" def func(): l = Label(root,text="Hello "+input.get()) l.pack() butt = Button(root,state=state(),command=func,text="click") butt.pack() root.mainloop() Here's the task: Write program to print the name along with "hello" if he Enter something in input box if he doesn't then click button should not be active

8th Feb 2022, 11:36 AM
Ravi King
1 Answer
+ 2
I don't think sololearner has all python library so some imports might not work. or it might just be u need to reach a higher level. I don't really know.
9th Feb 2022, 12:25 AM
Ace Brown
Ace Brown - avatar