發表文章

陳玟卉google co-laboratory機器學習

圖片
frame框架,前面要加上i,width寬度, height高度, src=source來源

陳玟卉python視窗建構Topievel與TK比較

圖片
程式碼 from tkinter import * #從tkinter函式庫輸入所有函式,檔案'window001.py' import time #412單元延續數入time套件 def delete(): #增加自訂函數def delete() List[int(n.get())-1].destroy() #destroy破壞視窗List[索引] win.config(bg='yellow') b1=Label(win,text='陳玟卉',font='Arial 100 bold',bg='0000ff').pack() x=('龍','龓','龕','💩','\U0001F600','\U0001F4A9') #建立元祖tuple名為x,0,1,2,3,4,5 List = [] #建立串列list名為List win=Tk() win.geometry('400x200+800+0') win.title('陳玟卉第控制原來的視窗') n = StringVar(win) #類別變數 n.set('刪除') op1 = OptionMenu(win,n,1,2,3,4,5,6).pack() bu1 = Button(win,text='刪除選取視窗',command=delete,font='20',bg='blue',fg='white') bu1.pack() for i in range(6): window = Toplevel() window.title('陳玟卉第%d個視窗' % (i+1)) window.geometry('300x250+%d+%d' % (i*300,i*50)) b1=Label(window,text=x[i],font='Arial 200 bold'...

陳玟卉期中考emoji繪文字onchange事件

圖片
陳玟卉輸入參數 輸入k 輸入m 輸入n 執行自訂函數 gray red green blue 重點 span手掌張開拇指到小指,短橋梁長度。 VSCode是IDE整合開發環境。 CTRL+SHIFT+L一次改全部 Integrated Development Environment alert內建函數,自訂函數abc 利用id加上syle方法是#id 陳玟卉輸出結果

自訂函數迴圈write模式a與w

圖片
386 387 388 https://www.peopo.org/news/669842 以上嵌入影片與網誌的程式碼 <h1>386</h1> <iframe width="560" height="315" src="https://www.youtube.com/embed/5tABDBFaO-A?si=deuL7AYiNHiT0E-4" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe> <h1>387</h1> <iframe width="560" height="315" src="https://www.youtube.com/embed/2raXFdpdUto?si=cxv4YtZpLzBw-XhZ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe> <h1>388</h1> <iframe width="560...

陳玟卉python內建built-in函數functions迴圈loop

圖片
截圖 程式碼 print(int(10)) print(int("ff",16)) print(int('100',16)) print(int('100',8)) a = [0>1, 2>1, 3==3]#串列list使用square bracket中括號 print("是否all全真",all(a)) print("存在任何any一個真",any(a)) print("陳玟卉bin二進位輸出一到9") for i in range(10): #0 to 9進位1 print(bin(i)) for i in range(0, 200, 10): print(hex(i)) a = ('蘋果', '香蕉', '櫻桃',"durian") b = "Hello World" c = 33 d ={'蘋果', '香蕉', '櫻桃',"durian"} e=['蘋果', '香蕉', '櫻桃',"durian"] print("a元組typle", type(a)) print("b字串", type(b)) print("c整數integer", type(c)) print(type(d), type(e)) w3schools內建函數列表 Python has a set of built-in functions. Function Description abs() Returns the absolute value of a number all() Returns True if all items in an iterable object are true any() Returns True if any item in an iterable object is true ascii() Returns a readab...

陳玟卉Python字串string方法methods

圖片
單元371影片 vs code與w3schools截圖 程式碼 txt = "陳玟卉Love西瓜,西瓜我my favoritE水果西瓜" print(txt.count("西瓜")) print('先練習內建函數len',len(txt)) print('find',txt.find("西瓜")) print('rfind',txt.rfind("西瓜")) print("print列印,字串string字元character的組合") print(txt.title()) print(txt.lower()) print(txt.upper()) print(txt.swapcase()) print(txt.zfill(32)) print(txt.startswith("陳")) print(len(txt)) for i in range(33333, 33344): print(chr(i)) for i in range(65, 70): print(chr(i)) w3schools字串方法列表 Method Description capitalize() Converts the first character to upper case casefold() Converts string into lower case center() Returns a centered string count() Returns the number of times a specified value occurs in a string encode() Returns an encoded version of the string endswith() Returns true if the string ends with the specified value expandtabs() Sets the tab size of the string find() Searches the string for a specified value a...

陳玟卉Java

圖片