葉可棠SVG與CANVAS
- 取得連結
- X
- 以電子郵件傳送
- 其他應用程式
w3schools練習SVG
w3schools練習canvas
心得
- canvas帆布
- ol=office lady, 這裡是 ordered list順序的清單
- 標楷體命令「font-family: DFKai-sb」
- 幕前排版系統word,編輯網頁的撰寫模式,幕後排版系統控制你的命令
教學影片
維基百科SVG
維基百科canvas
這個網誌中的熱門文章
w3schools字串slicing[::],str,len
b = "我男友是個大帥哥" #python字串單或雙引號都可 # 0 1 2 3 4 # -6-5-4-3-2-1 print("字串長度:"+str(len(b)))#相同字串型態才能串接 print("反過來:"+b[::-1]) print(b[:3]) #b字串的0,1,2 print(b[-4:-1]) print(b[-8:-4]) x='火鍋' y=9999 myorder="我希望{2}陪我去吃{0}他付錢{1}." print(myorder.format(x, y, b)) # format的參數 0 1 2 字串的方法列表 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 and returns the position of where it was found format() Formats specified values in a string format_map() Formats specified values in a string index() Searches the string for a specified value and returns the position...
葉可棠期中考VS Code編輯Python
from tkinter import * #從函式庫 tkinter 輸入所有 * 方法 from math import * #從函式庫 math 輸入所有 * 方法 t = (3,4,5,6,7,8,9,10,11,12,16,20,32) #宣告一元組tuple(...) tk = Tk() tk.title("劉任昌圖形使用者介面GUI=Graphical Unser Interface") canvas = Canvas(tk, width=500, height=500) canvas.pack() def show(event): #定義由事件event(按鈕選單)呼叫的函數show cx, cy, cr = 210, 210, 200 #宣告圓中心座標cx, cy半徑cr x, y =[],[] #宣告二陣列[...] k = s.get() #取得 ge t按鈕選單的選擇變數 u = 2 * pi / k #使用模組 math 圓周率 pi for i in range(k): x.append(cx + cr*cos(i*u)) #加入陣列的元素 y.append(cy + cr*sin(i*u)) #使用模組 math 三角函數cos, sin for i in range(k-1): canvas.create_line(x[i], y[i], x[i+1], y[i+1]) canvas.create_line(x[k-1], y[k-1], x[0], y[0]) #可考慮增加width寬度,fill顏色 def diagonal(): cx, cy, cr = 210, 210, 200 #宣告圓中心座標cx, cy半徑cr外來學繼承 inheritance x, y =[],[] #宣告二陣列[......
D11117310葉可棠JavaScript將輸入的字串顛倒輸出
網頁介面 葉可棠輸入字串: 程式碼 <p>葉可棠輸入字串:<input id="in" len="40" type="text" /></p> <p><input onclick="f()" type="button" value="執行JavaScript" /></p> <p id="out"></p> <script> function f(){ var a = document.getElementById("in").value;/*取得id=in的文字*/ var b ="原字串:" + a + "<br>長度是:" + a.length + ",反串是: "; var c = ""; for (var i = 0; i < a.length; i++) c = a.slice(i,i+1) + c ; b = b +"<front size=7>" + c + "</front>"; document.getElementById("out").innerHTML = b; } </script> vs CODE編輯JAVA import java.util.Scanner; /*開啟套件package util=utility用途,Scanner掃描器*/ /*葉可棠utility industry=公用事業產業,電力,自來水,效用=utility */ class MyClass { public static void main(String[] args) { String a, b=""; /*定義字串a,b */ Scanner...
留言
張貼留言