Tkinterでボタンを押すと1からxまでの整数のうち3の倍数と3のつく数字、およびその数の合計を画面に出力したいです。
また、クリアボタンを押すと出力した数字を消すボタンも用意したいです。
python
1コード 2```import tkinter 3 4 5root = tkinter.Tk() 6 7root.geometry('600x400') 8 9root.title('TASK') 10 11lbl = tkinter.Label(text='数値を入力してください') 12lbl.pack() 13 14txt = tkinter.Entry(width=20) 15txt.pack() 16 17Button = tkinter.Button(text='出力') 18Button.pack() 19 20 21 22root.mainloop()
回答1件
あなたの回答
tips
プレビュー