Carrey Chen
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    ###### tags: `Python` # Pyton 教學 第一隻影片 哈嘍!大家好! 在這個系列的影片中 我們會仔細的將 基礎 python 程式設計 看過一次 其內容包含 學習如何開始並執行 python 如何使用不同的資料型態 如何使用條件敘述、迴圈、迭代 如何建立 function class 如何載入 module 與使用 python 標準函式庫 裝飾器 語法糖 今天這個影片主要目標是在 MAC OS 中,準備 Python3 的開發環境 影片中我會展示如何在 macos 中安裝 python 3 接著,安裝編寫程式的工具,在這裏我們使用 sublime text 最後簡單的寫一隻程式,並看到輸出的結果 影片中我會盡可能使用簡單的比喻,讓看這個系列的人 能輕鬆的了解特定專有名詞的意思 這不表示你可以不記得專有名詞,畢竟當我們開始走向這條路 不管是與其他人一同工作也好,或者交流問題也好,共同的專有名詞對於快速溝通是有效的 雖然這是個基礎系列,但過程中有機會談到比較深入的內容 或者 程式底層運作 這對程式初學者來說可能是壓力 請不要太在意 隨著這個系列推進建立基礎,你會漸漸明白 原來這是什麼 或者 為什麼 讓我們開始吧 第一件事情,我們要來學習如何安裝 python 並在電腦中設定開發環境 所謂的"設定開發環境" 意思是指去調整目前電腦 幫助我們在程式開發的過程中可以更方便順手 其中包括作業系統設定的調整,或者安裝一些應用程式來協助我們開發 就比如你是廚師,在做菜之前,你需要將環境整理好,準備好刀具、沾板、鍋碗瓢盆,放在順手的地方 讓你方便執行做菜這個任務,當你成為一個更優秀的廚師,需要準備的東西也會越來越多 寫程式也是一樣 接著讓我們來準備主菜 安裝 python ``` text 這個過程非常簡單 第一步打開瀏覽器,這裏準備的是 google chrome,你可以使用任何你熟析的瀏覽器 在網址列輸入 www.python.org 把滑鼠遊標指到 download 的圖樣 你會看到這個網站非常聰明,已經自動偵測到我的作業系統是 macos,建議我下載 python 版本 3.8.5 這是 python 組織認定目前較為穩定的版本 但隨著時間推進,當你看到這支影片的時候, python 組織推薦的版本可能不同 我會建議以官方推薦為主,版本異動對於觀看這個系列並不會有太大的差異 點擊下載按鍵,你會得到一個.pkg副檔名的檔案 點擊檔案開始進入安裝流程 安裝完成,打開終端機 (說明終端機位置) 在 macos 中已經內建了 python2 (操作顯示目前 python 的版本) 而我們安裝的 python 3 指令不同 (操作顯示目前 python3 的版本) ( 執行 python3 並寫一個 hello world 程式在 command prompt) (exit() 離開 python 執行環境) ``` 以上例子你會看到,在終端機中執行 python 非常快速,透過一行一行的程式與 python 互動 而實際的況狀,我們會撰寫多行程式一次執行,將 python 語法寫在一個檔案中,透過 python 執行檔案的內容 (使用 python 內建的 idle 進行演示) Python 內建的文字編輯器還是非常陽春 我們來看看幾個非常受歡迎的程式編輯器 > 介紹幾個 python 常用的 ide (sublime atom vscode pycharm) 在這些編輯器中,有些甚至是專門為 python 所設計的,它們提供了非常多美妙的功能,當你一步步經歷程式開發的不同階段,你會發現它們非常有效且便利的協助你快速開發程式 在學習 python 這一系列的影片中,我也會一一與各位分享這些有用的輔助功能 如果你已經對編輯器有一定的認識,或者已經有習慣的編輯器,也歡迎你使用它來跟著這個系列前進 或者你不知道該選那一個 我在這一系列的影片中使用的是 sublime text sublime text 簡單易用,對於剛開始接觸程式的人,之於漂亮的介面圖示與多樣的輔助功能 我更傾向簡潔的介面,專注在語言的學習 > 演示如何安裝 sublime text > 演示如何使用 sublime text 執行 python 程式 你可以直接在 sublime text 中執行 python 程式 在單一個編輯器介面中,就可以完成所有動作,是不是簡單多了 我會獨立做一隻影片來分享如何在 macos 中使用 sublime text 執行 python3 而在這個系列的下一支影片我們來看看 python 中的變數與資料型態,詳細的說明並看看我們能運用它們做什麼 如果你對這支影片有任何的想法或問題,歡迎你在討論區留言,我會盡我所能的回答你的問題 如果你喜歡這支影片,也歡迎您按讚分享 或訂閱加小鈴噹以確定你能看到接下來的影片 謝謝你看完這支影片

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully