Ask coding questions

← Back to all posts
What's wrong with it?? Plz help...
CollinKunsman (108)

It won't run. Can you PLEASE help me out??

class Application(Frame):
definit(self, master):
super(Application, self).init(master)
self.grid()
self.create_widgets()
def create_widgets(self):
self.buttn1 = Button(self, text = "I do nothing!")
self.buttn1.grid()
self.buttn2 = Button(self)
self.buttn2.grid()
self.buttn2.configure(text = "Me too!")
self.buttn3 = Button(self)
self.buttn3.grid()
self.buttn3["text"] = "Same here!"
root = Tk()
root.title("Broken Brokens 2")
root.geometry("200x85")
app = Application(root)
root.mainloop()

Answered by fifiinart (8) [earned 5 cycles]
View Answer
Comments
hotnewtop
fifiinart (8)

First of all, you shouldn't repost a question. Second, may I have the link to the repl that you are using to edit the thing? Thank you.

fifiinart (8)

@CollinKunsman OK....first, did you import tkinter? I'm not that good with Python but I know you have to import modules to use them.

Second, make sure you double-check your work. You typed def_init_(... which caused a syntax error.

Hope I helped!

mat1 (4456)

Can you please post a link to your repl? Thanks!