Bỏ qua nội dung
Học lập trình — Python, Java, C, SQL & Web

Python Cơ bản

Những bước đầu tiên của bạn trong lập trình — không cần kinh nghiệm.

  • python
  • 22 Bài học
  • 6 projects
  • 15 videos
  • Chạy trực tiếp trên trình duyệt của bạn

Trên thiết bị này: 0 trong số 22 bài học đã hoàn thành

Bắt đầu khóa học

Mỗi bài học chạy trên trình duyệt của bạn — viết mã thật, nhấn Chạy, và các nhiệm vụ tự kiểm tra. Miễn phí, không cần tài khoản, kèm ghi chú dịch song ngữ với tiếng Anh.

Các bài học trong khóa học này

Đang hiển thị 26 trong số 26 bài học

Part 1 You build: Project: Mad Libs

  1. Chạy nó! Các nút bấm · Khi có điều gì đó đi sai · Khi một chương trình chờ đợi bạn Lesson 0 · 3 nhiệm vụ bắt buộc · ★
  2. Chương trình đầu tiên của bạn Show text with print · Strings · Comments Lesson 1 · 3 nhiệm vụ bắt buộc · ★ Video
  3. Biến (Variables) A box with a name · Make a variable · Naming rules · Change a variable Lesson 2 · 3 nhiệm vụ bắt buộc · ★ Video
  4. Số & toán tử Two kinds of number · Add, subtract, multiply, divide · Whole-number division, remainder, powers · Order of operations Lesson 3 · 3 nhiệm vụ bắt buộc · ★ Video
  5. Lấy dữ liệu đầu vào Ask the user with input · When your program waits · input always gives a string · Turn text into a number Lesson 4 · 3 nhiệm vụ bắt buộc · ★ Video
  6. Làm việc với chuỗi ký tự Letters have positions · Take a slice · Length and changing case · f-strings build text Lesson 5 · 4 nhiệm vụ bắt buộc · ★★ Video
  7. Dự án Project: Mad Libs Collect the words · Change a word · A title with a line under it Dự án · ★★

Part 2 You build: Project: Guess the number

  1. Ra quyết định Making a choice · Comparisons · if / elif / else · The remainder Lesson 6 · 4 nhiệm vụ bắt buộc · ★★ Video
  2. Vòng lặp đếm Repeat with for · Counting with range · Build a total (accumulator) · Words and a number on one line Lesson 7 · 4 nhiệm vụ bắt buộc · ★★ Video
  3. Vòng lặp While Loop while a condition is true · Always change the condition · break and continue · Checking before or after Lesson 8 · 3 nhiệm vụ bắt buộc · ★★ Video
  4. Dự án Project: Guess the number One guess · Keep guessing · Print the count · The sentence Dự án · ★★★

Part 3 You build: Project: Quiz with a score

  1. Lists (1-D arrays) A list holds many values · Get and change items · Add items and count them · Loop over a list Lesson 9 · 3 nhiệm vụ bắt buộc · ★★ Video
  2. Dự án Project: Quiz with a score Two lists that match · Keep the score · Forgive the typing Dự án · ★★★

Part 4 You build: Project: Rock, paper, scissors

  1. Hàm số Name a block of code · Give it inputs (parameters) · Send back a result (return) · return vs print Lesson 10 · 3 nhiệm vụ bắt buộc · ★★ Video
  2. Dự án Project: Rock, paper, scissors Who wins? · Functions can use functions · Check what the player typed · Play for real Dự án · ★★★

Part 5 You build: Project: Text adventure

  1. Phạm vi & tham số Local variables · Global variables · Default values · How arguments are passed Lesson 11 · 4 nhiệm vụ bắt buộc · ★★★ Video
  2. Dictionaries (records) Store data by name · Get and set values · A dictionary as a record · Check and loop Lesson 12 · 3 nhiệm vụ bắt buộc · ★★★ Video
  3. Dự án Project: Text adventure A dictionary inside a dictionary · Is there a door? · Follow a list of directions · Play for real Dự án · ★★★★

Part 6 You build: Project: Hangman

  1. Lên kế hoạch & mã giả Plan before you code · Decomposition · Abstraction · Structured English Lesson 13 · 3 nhiệm vụ bắt buộc · ★★ Video
  2. Lỗi & kiểm thử Three kinds of error · Syntax errors · Runtime errors · Logic errors Lesson 14 · 3 nhiệm vụ bắt buộc · ★★★ Video
  3. Kết hợp tất cả lại The plan · Handy built-ins for lists · A pattern you will reuse: count items that pass a test Lesson 15 · 3 nhiệm vụ bắt buộc · ★★★ Video
  4. Dự án Project: Hangman Plan first · Build a string letter by letter · Stop as soon as you know · The game loop Dự án · ★★★★

Đọc và tài liệu tham khảo

  1. Lịch sử ngắn gọn của Python Where Python came from · Why the funny name · Built for people to read · Python today Đọc và tài liệu tham khảo
  2. Python được dùng để làm gì What people build with Python · Websites and apps · Data, AI, and science · Automation Đọc và tài liệu tham khảo
  3. Nơi tìm hiểu thêm Chơi và thực hành · Đọc và tham khảo · Các khóa học khác trên trang này · Mẹo Đọc và tài liệu tham khảo
  4. Cài đặt máy tính của bạn Run Python on your own computer · Step 1 — Install Python · Step 2 — Install VS Code · Step 3 — Add the Python extension Đọc và tài liệu tham khảo
Open the Python reference Every topic in one place, with short examples you can run.

Nơi tìm hiểu thêm

Đăng nhập hoặc tạo tài khoản

IGCSE, A-Level & AP