Jump to content

Help

Go to solution Solved by Sauron,
4 minutes ago, ALBas126 said:

this is the video I used 

 

Why did you call tkinter() (which does not exist) instead of Tk() as seen in the tutorial?

image.png.a209babab0d51af79dcb8202cc73718a.png

I was trying to get back into coding and I was watching and following a long a yt tutorial what is the problem with this code?

 

from tkinter import *

root = tkinter()

# Creating a label widget
myLabel = label(root, text="Hello World!")
# Shoving it to the top screen
myLabel.pack()


root.mainloop()

 

the error I got said: 

Traceback (most recent call last):
  File "gui toturial.py", line 3, in <module>
    root = tkinter()
NameError: name 'tkinter' is not defined

***Repl Closed***
 

Link to comment
https://linustechtips.com/topic/1221977-help/
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×