-
카테고리
-
세부 분야
데이터 분석
-
해결 여부
미해결
오류가 나서 확인부탁드려요 저는 못잡겠어요 ㅠㅠ
18.08.01 05:48 작성 조회수 103
0
from tkinter import *
def printHello() :
print('hi')
root = Tk()
w = Label(root, text="pytion test")
b = button(root, text="hello python", command=printHello)
c = button(root, text="Quit",command=root.quit)
w.pack()
b.pack()
c.pack()
root.mainloop()
Traceback (most recent call last):
File "C:section2test1.py", line 10, in
b = button(root, text="hello python", command=printHello)
NameError: name 'button' is not defined
[Finished in 0.245s]
답변을 작성해보세요.
0
좋은사람
지식공유자2018.08.01
안녕하세요.
Button 텍스트 앞이 대문자 입니다.
항상 에러 콘솔 내용을 확인해주세요.
파이썬 기초 무료 강의를 인프런에서 먼저 듣고 오시는게 더 좋을 것같습니다.
그래야 앞으로 섹션2 이후에 있을 복잡한 코드도 대비가 됩니다.
감사합니다.
답변 1