MikkiCoding
MikkiPastel
  • Welcome!
  • 👩‍🏫👩‍💻 Introduction of Programming
    • การทำงานของคอมพิวเตอร์เบื้องต้น
    • การแปลภาษาของโปรแกรม
    • Flowchart
    • Preprocesser Directory
    • Basic Coding
  • 🐍Python for Beginner
    • แนะนำภาษา python
    • ติดตั้งโปรแกรม python ลงบน computer
    • การพิมพ์คำสั่งขั้นต้น
    • Data type และการประกาศตัวแปร
    • Comparison
    • Condition Statement
    • Loop Statement
    • การใช้ break, continue และ pass ใน statement
    • Function
    • Data structure
    • การทำงานร่วมกันกับไฟล์
    • Exception handling
    • Document และแหล่งเรียนรู้อื่นๆ
  • 🤖Discord Bot Hands-on
    • Introduction
    • Discord Bot & Example
    • Create Your First Discord Bot
      • Create Your Discord Server
      • Create Discord Bot Account
      • Bring Discord Bot to Server
    • Workshop
      • Create First Slash Command
      • Create Slash Command with Parameter
      • Return Embeds and Button
      • Webhook
    • Reference
  • 💁‍♀️Android Developer Trip
    • Android Logcat
  • 📑Content
    • Content Roadmap Rule
    • 2024
      • Content Roadmap Sprint 01/2024 (15 - 26 January)
      • Content Roadmap Sprint 02/2024 (29 January - 9 February)
    • 2023
      • Content Roadmap Sprint 01/2023 (21 May - 2 June)
      • Content Roadmap Sprint 02/2023 (5 - 16 June)
      • Content Roadmap Sprint 03/2023 (19 - 30 June)
      • Content Roadmap Sprint 04/2023 (3 - 14 July)
      • Content Roadmap Sprint 05/2023 (17 - 25 July)
      • Content Roadmap Sprint 06/2023 (31 July - 11 August)
      • Content Roadmap Sprint 07/2023 (14 - 25 August)
      • Content Roadmap Sprint 08/2023 (28 August - 8 September)
      • Content Roadmap Sprint 09/2023 (11 - 22 September)
      • Content Roadmap Sprint 10/2023 (25 September - 6 October)
      • Content Roadmap Sprint 11/2023 (9 - 20 October)
      • Content Roadmap Sprint 12/2023 (6 - 17 November)
      • Content Roadmap Sprint 13/2023 (20 November - 1 December)
      • Content Roadmap Sprint 14/2023 (6 - 22 December)
    • 2022
Powered by GitBook
On this page
Edit on GitHub
  1. Python for Beginner

แนะนำภาษา python

Last updated 3 years ago

python เวอร์ชั่นปัจจุบัน คือ 3.6 (19 มิถุนายน 2560) เป็น high-level language มีการแปลภาษาแบบ interpreter คือทำทีละบรรทัด เป็นภาษาที่เรียนรู้ได้ง่าย

ในชีวิตประจำวัน python ถูกนำมาใช้งานหลายอย่าง เช่นการทำ back-end ของ dynamic website, ใช้ในงาน data science, การเขียนโปรแกรมลงบน hardware สำหรับงาน embedded system เป็นต้น สามารถดาวน์โหลด python มาใช้งานได้ที่ และมี document วิธีการเขียนโปรแกรมด้วยภาษา python ที่

เราสามารถใช้ editor ในการเขียนโปรแกรมภาษา python ได้หลากหลายโปรแกรม เช่น notepad++, sublinetext, pyCharm เมื่อเราติดตั้งตัว python แล้ว ก็สามารถ run source code ภาษา python ได้

ความแตกต่างของ python 2.7 vs python 3.3 ถึงเวอร์ชั่นปัจจุบันจะเป็น python 3.x แต่มีบางโปรแกรมและบางหน่วยงานใช้ python 2.7 อยู่ ดังนั้นเราจะมาดูความแตกต่างกันระหว่าง 2 เวอร์ชั่นนี้

python 2.7
python 3.x

Print

print “hello world”

print (“hello world”)

Integer Division

3/2 = 1

3/2 = 1.5

Input Value

raw_input()

input()

Stripline in File

string.spilt(f.read(), “\n”)

f.read().strip().splitlines()

File Mode

rb, wb, ab

r+, w+, a+

การเลือกใช้ python ขึ้นอยู่กับโปรแกรมที่รองรับ และปัจจัยอื่นๆ ที่นอกเหนือจากความใหม่ของเวอร์ชั่น

🐍
https://www.python.org/downloads/
https://docs.python.org/3/library/