> For the complete documentation index, see [llms.txt](https://python.dainganxanh.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://python.dainganxanh.com/chuong1/bai-2.md).

# Bài 2. Từ khóa và định danh

1\. Từ khóa (keywords)

Từ khóa (keyword) là những tên dành riêng của Python, chúng được định nghĩa sẵn để sử dụng. Chúng ta không thể dùng keyword để đặt tên biến, tên hàm hoặc bất kỳ đối tượng nào trong chương trình.

Ví dụ một số keyword: True, False, await, else, import, pass, break, except, in, and, or, ….

Tất cả các keyword trong Python đều được viết thường, trừ 03 key word: True, False, None.

Thực tế thì không cần nhớ keyword vì khi gõ trình soạn thảo sẽ có gợi ý các keyword (ta tránh đặt tên đối tượng trùng với các keyword được gợi ý) và nếu đặt trùng tên keyword thì khi chạy chương trình sẽ báo lỗi.

2\. Định danh (Identifiers)

Định danh là việc đặt tên cho các đối tượng trong chương trình như tên hàm, tên biến, lớp,… Tên các đối tượng được đặt bằng các ký tự thường (a-z), ký tự in hoa (A-Z), chữ số (0-9) và dấu gạch dưới \_ . Ví dụ: bien1, lop, var\_1, …

Tên đối tượng không bắt đầu bằng chữ số. không dùng các ký tự đặc biệt như !, @, #, … và được phân biệt chữ hoa, chữ thường.

Lưu ý: Nên đặt tên đối tượng có tính gợi nhớ. Ví dụ, với một biến đếm, thay vì đặt d = 10 thì ta nên đặt là dem = 10 .

Ví dụ chương trình đơn giản:

```python
A = 2
a = 3
tong = a+A
tich = a*A
print(a)
print(A)
print("Tổng a và A là",tong)
print("Tích a và A là",tich)
input()
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://python.dainganxanh.com/chuong1/bai-2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
