劉庭妤canvas繪選擇權到期日損益w3schools繪圖工具 取得連結 Facebook X Pinterest 以電子郵件傳送 其他應用程式 12月 24, 2023 canvas繪圖套件繪製選擇權到期日損益圖 買入選擇權到期日損益 賣出選擇權到期日損益 W3SHOOLS繪圖工具示範CANVAS Your browser does not support the HTML canvas tag. W3SHOOLS繪圖工具示範VSG Sorry, your browser does not support inline SVG. 心得整理 俄羅斯方塊用到CANVAS ID="TETRIS" WIDTH HEIGHT 取得連結 Facebook X Pinterest 以電子郵件傳送 其他應用程式 留言
劉庭妤bro code貪吃蛇 6月 12, 2024 程式碼貼上要用撰寫模式 from tkinter import * import random GAME_WIDTH , GAME_HEIGHT = 1000 , 800 SPEED = 1000 SPACE_SIZE , BODY_PARTS = 50 , 3 #左邊變數 assigning value SNAKE_COLOR = "#00FF00" FOOD_COLOR = "white" BACKGROUND_COLOR = "#000000" class Snake : def __init__ ( self ): self . body_size = BODY_PARTS self . coordinates = [] self . squares = [] for i in range ( 0 , BODY_PARTS ): self . coordinates . append ([ 0 , 0 ]) for x , y in self . coordinates : square = canvas . create_rectangle ( x , y , x + SPACE_SIZE , y + SPACE_SIZE , fill = SNAKE_COLOR , tag = "snake" ) self . squares . append ( square ) class Food : def __init__ ( self ): x ... 閱讀完整內容
劉庭妤bro code貪吃蛇import module教育學習網 6月 12, 2024 https://steam.oxxostudio.tw/category/python/basic/import.html 匯入模組 import Module 在 Python 裡,「模組」是一個存在於任意程式碼中的檔案,任何 Python 的程式碼也都可以當作模組使用,透過 import 陳述式,可以引用其他模組的程式碼,進一步使用其他模組的程式和變數,讓程式更精簡更好維護。 改寫自bro code貪吃蛇 from tkinter import * import random GAME_WIDTH , GAME_HEIGHT = 1000 , 800 SPEED = 1000 SPACE_SIZE , BODY_PARTS = 50 , 3 #左邊變數 assigning value SNAKE_COLOR = "#00FF00" FOOD_COLOR = "white" BACKGROUND_COLOR = "#000000" class Snake : def __init__ ( self ): self . body_size = BODY_PARTS self . coordinates = [] self . squares = [] for i in range ( 0 , BODY_PARTS ): self . coordinates . append ([ 0 , 0 ]) for x , y in self . coordinates : square = canvas . create_rectangle ( x , y , x + SPACE_SIZE , y + SPACE_SI... 閱讀完整內容
劉庭妤keyevents期末考 6月 26, 2024 from tkinter import * def doSomething(event): #print("You pressed: " + event.keysym) label.config(text=event.keysym) window = Tk() window.title('劉庭妤期末考') window.bind("<Key>",doSomething) #<, >在網頁表示要使用\<,\> label = Label(window,font=("Helvetica",300),bg='yellow') label.pack() window.mainloop() 閱讀完整內容
留言
張貼留言