麻瓜也能上手的爬說語:開源社 Python 入門

B3ecf4287d58054135af5d7b4d741021?s=47 Poren Chiang
October 03, 2014

麻瓜也能上手的爬說語:開源社 Python 入門

2014/10/3 Talk @ NTU Open Source Community, NTUCC, Taipei, Taiwan.
Licensed under CC BY-SA 4.0.

B3ecf4287d58054135af5d7b4d741021?s=128

Poren Chiang

October 03, 2014
Tweet

Transcript

  1. 25.

    垸穉 NPEVMFT ˖ Ⰹ䒊涸垸穉〳⟃䖰1ZUIPO
 㸽倰笪畀叆鑉ⵌ • ˤ٨̨╹೿ม PyPI ୷⪑ơ
 㡠[sudo]

    pip install …㡡 • ˤ٨̨╹೿Хơ
 㡠ʫϪ⳻ቛ৫࿡ዅʫϪᗃᐲ㡤 Ӱவ௡ዅʫϪᕻ⊓㡡
  2. 26.
  3. 28.

    #include <iostream> using namespace std; ! int main(int argc, char*

    argv) { cout << “Hi NTUOSC!”; return 0; } print(“Hi NTUOSC!”) $ 1ZUIPO Ⱖ㻜♧遤㽠腋邍麨幢嘽 玑䒭銴⨞➊랃✫ 騈1ZUIPO涸print()䠑䙼僽湱ず涸
  4. 29.

    string a = “ݙ”;
 string b = “”; for (int

    i = 1; i <= 5; i++) { b += a; } cout << b; print(“ݙ” * 5) $ 1ZUIPO 俒㶶銴隶❀⦔ 湬䱺⛨⟃㽠㥪✫ ♶䗳駵㔐⿡书ꚽ瀖
  5. 30.

    for (int i = 1; i <= 5; i++) {

    cout << “#” << i << “\n”; } for i in range(5): print(“#” + str(i)) $ 1ZUIPO 鎹䖤銴欽瑠呔簮䱖ㆦ
  6. 34.

    JNQPSUTNUQMJC DMJFOUTNUQMJC4.51@44- 
   NBJMOUVFEVUX port=  DMJFOUTFOENBJM 

    䖎㢵➃鿪♶濼麥 Ⱖ㻜〫銴♲遤玑䒭㽠〳⟃㺕♧㼓FNBJM