41223114

  • Home
    • SMap
    • reveal
    • blog
  • First
  • W1~W3(登入並設定筆記作業網站之密碼)
  • W2~W4
    • IPV4
    • IPV6
    • INFO
  • W5(初次嘗試gd繪圖,以三角函數波型圖為例)
  • w6(以gd繪圖嘗試各國之國旗繪製)
    • 中華民國國旗
    • 日本國旗
    • 美國國旗
    • gd繪圖之流程簡介
  • W9(嘗試遠端連結S1511)
  • W11(使用瀏覽器開啟國旗檔)
  • W13(開啟github倉儲)
  • putty使用
    • 步驟1
    • 步驟2
    • 步驟3
  • W15
    • Q1
  • experience
  • Brython
experience << Previous

Brython

https://en.wikipedia.org/wiki/Python_(programming_language)

Examples:

https://gist.github.com/mdecycu/d9082d678096bd58378d6afe2c7fa05d

https://www.geeksforgeeks.org/python-programming-examples/

https://www.programiz.com/python-programming/examples

https://www.freecodecamp.org/news/python-code-examples-sample-script-coding-tutorial-for-beginners/

Python Tutorial:

https://docs.python.org/3/tutorial/

An informal introduction to Python

Indentation (Python 採 4 個 Spaces 縮排, 以界定執行範圍)

Variables (Python Keywords)

Comments (# 單行註解, 三個單引號或三個雙引號標註多行註解)

Numbers (整數 int(), 浮點數 float())

Strings (字串)

print (Python 內建函式, print() 函式)

Python control flow tools

for

if

range

open

read

lists

tuples

dictionaries

functions

try ... except

break

pass

classes

這個頁面 demo 如何在同一頁面下納入多個線上 Ace 編輯器與執行按鈕 (practice_html.txt 動態頁面超文件).

practice_html.txt 動態頁面超文件應該可以在啟動 Brython 時, 設定將 .py 檔案放入 downloads/py 目錄中引用.

亦即將所有對應的 html 也使用 Brython 產生, 然後寫為 class 後, 在範例導入時透過 instance 引用.

<!-- 啟動 Brython -->
<script>
window.onload=function(){
brython({debug:1, pythonpath:['./../cmsimde/static/','./../downloads/py/']});
}
</script>

從 1 累加到 100:

將 iterable 與 iterator 相關說明, 利用 Brython 與 Ace Editor 整理在這個頁面.


從 1 累加到 100 part2:



experience << Previous

Copyright © All rights reserved | This template is made with by Colorlib