跳到主要內容

發表文章

精選

D1117128王治騰期末考60分

+ def draw():#按下按鈕Button1 for firm in firms: t=(firm, year.get()) x = 10+20*stdev[t]*2*3**0.5 #放大20 y = 500 - 10*mean[t]*12 #放大10 dot=canvas.create_oval(x-5,y-5,x+5,y+5,fill='blue') lab=canvas.create_text(x+10,y,text=firm[4:7],anchor=W,font=('微軟中黑體', 16)) def delete():#按下按鈕Button2執行Delete canvas.delete('all') years=[x for x in range(2007, 2025)] year=IntVar(tk) year.set(years[-1]) label = Label(tk, text="年度",font=('Arial',30,'bold'),).pack(side=LEFT) #距離左側 option1 = OptionMenu(tk, year, *years).pack(side=LEFT) button1 = Button(tk, text="王治騰繪圖 ",font=('Arial',20,'bold'), command = draw, bg='#5599FF',fg='white').pack(side=LEFT) button2 = Button(tk, text="王治騰刪除 ",font=('Arial',20,'bold'), command = delete, bg='#5599FF',fg='white').pack(side=LEFT) tk.mainloop() #label button1 button2都改變字體

最新文章

王治騰期中考python讀取csv檔案

標普500正三、正二、SPY、負一、負二、負三

D11117128王治騰JavaScript執行輸入字串再反向輸出JS Code編輯Java

王治騰Java方法length(), charAt(), EXCEL函數LEN, MID 12月 25, 2022

王治騰javascript條件判斷html表單form下拉式選單select option按鈕button

王治騰網路雲端使用金融市場常識測驗練習與解答JAVA,Script