Cracked Head
    • 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

      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.
      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
    • Engagement control
    • 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 Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control 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

    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.
    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
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # 1. Python簡介與安裝 ###### tags: `Python` - Python 教學 第一篇 安裝Python並測試撰寫 ::: info 推薦影片教學頻道: - 英文 : [Tech With Tim](https://www.youtube.com/c/TechWithTim/featured) - 中文 : [彭彭老師的程式教學](https://www.youtube.com/watch?v=wqRlKVRUV_k&list=PL-g0fdC5RMboYEyt6QS2iLb_1m7QcgfHk&index=1&t=24s) ::: ### 一、簡介: Python 0.9.0是在1991年由Guido van Rossum(Python創始人)發布的正式發行版 最近Python開始在數據分析、人工智慧廣泛被使用並漸漸走入人們的視野。 Python是一泛用的程式語言,簡單易懂。 ### 二、下載Python: #### 1. 至 [Python官網](https://www.python.org/downloads/) 下載Python安裝檔 ::: warning #本教程以使用 Python 3.8.8 為主 ::: #### 2. 點擊 [Download] 進入下載頁面 ![](https://i.imgur.com/ddteNy2.png) #### 3. 選擇與自家作業系統相對應的選下進行下載 在下的是Window-64bit ![](https://i.imgur.com/AOg2IlW.png) #### 4. 下載好後開啟安裝檔 開始安裝 ![](https://i.imgur.com/EUdQEGt.png) #### 5. !!!千萬!!!記得!!!打勾!!!Add Python to Path!!! 勾選 Add Python to Path 之後點擊 Install Now ![](https://i.imgur.com/OPtRPVg.png) #### 6. 恭喜你成功的安裝Python了 ![](https://i.imgur.com/jtSXE0N.png) ### 三、下載編譯器: #### 1. 至 [VScode官網](https://code.visualstudio.com/Download) 下載安裝檔 ::: warning #本教程以使用 VScode 為主要編譯器 ::: #### 2. 選擇與自家作業系統相對應的下載選項 我的當然就是Windows囉 ![](https://i.imgur.com/xYOBeQj.png) #### 3. 下載好後開啟安裝檔 開始安裝 ![](https://i.imgur.com/HA6yqaa.png) #### 4. 同意使用條款 ![](https://i.imgur.com/6MNG28w.png) #### 5. 勾選自己所需要的選項 ![](https://i.imgur.com/FI7qNhj.png) |選項|功能| |:-:|:-:| |建立桌面捷徑|就是建立桌面捷徑| |將以Code開啟動作加入Windows檔案總管檔案的操作功能表中|右鍵會有以VScode開啟的選項| |將以Code開啟動作加入Windows檔案總管目錄的操作功能表中|右鍵會有以VScode開啟的選項| |針對支援的檔案類型將Code註冊為編譯器|針對不同副檔名更換檔案圖示| |加入Path中 (重新啟動後生效|可以從Terminal中開啟VScode| 基本上在下建議可以全部勾選 VScode本身可支持編寫的程式語言相當多 右鍵開啟的選項讓你可以省去開VScode 點開啟舊檔 找檔案 這些麻煩的動作 第四項 加入Path中 呢 就看個人了 當然加了不會有什麼影響 但比較適合熟悉Terminal使用的人做勾選 #### 6. 下一步 => 安裝 ![](https://i.imgur.com/53Iaus9.png) 這樣就安裝完成囉 有勾選加入Path的人要記得重啟一下電腦 這樣選項才會生效 ### 四、設置環境撰寫我們的第一個程式: ![](https://i.imgur.com/n05YplU.png) #### 1. 開啟VScode 點選旁邊的小圖示 #### 2. 在搜尋欄中輸入Python #### 3. 安裝Microsoft發布的Python Extension ![](https://i.imgur.com/n6QLsHT.png) #### 4. 點擊左側的小圖示回到編程頁面 #### 5. 鍵盤熱鍵 Ctrl+N 或 點擊File => New File建立一個新檔案 #### 6. 鍵盤熱鍵 Ctrl+S 或 點擊File => Save 儲存檔案 ![](https://i.imgur.com/dyEnvn0.png) #### 7. 將附檔名改為 .py 檔 #### 8. 回到編輯頁面 開始撰寫第一個程式 Hello World! ```python= print("Hello World!") #print()可以輸出括號中的資料 資料的各種型態將在下一篇說明 ``` #### 9. 鍵盤熱鍵 Ctrl+F5 或 右上方綠色撥放鍵 ![](https://i.imgur.com/D36yCJX.png) #### 10. 執行結果 ![](https://i.imgur.com/DzAlW9g.png) ### [下一篇](https://hackmd.io/ciwsdYteTx227FSIs_3IjA?view)

    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

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    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