Skip to content

Commit

Permalink
Docs: Update arithmetic-operation.md (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
luckrnx09 authored Jan 2, 2024
1 parent 6a6ff0e commit a1bfc5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/arithmetic-operation.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ print("Updated num2 after decrement:", num2)

### Code Highlight
- The syntax for addition, subtraction, multiplication, division, remainder, and exponentiation in Python is the same as in JavaScript.
- sum is the [Built-in Function](https://docs.python.org/3/library/functions.html?highlight=sum#sum) in Python, it is important to avoid using it.
- `sum` is the [Built-in Function](https://docs.python.org/3/library/functions.html?highlight=sum#sum) in Python, it is important to avoid using it as a variable name.
- Python does not have the `++` and `--` operators. Instead, `+=` and `-=` are used to increment or decrement variables.

### Difference Quick View
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ print("自减后的 num2:", num2)

### 代码解读
- Python 的加、减、乘、除、取余、指数运算语法与 JavaScript 一致。
- sum 在Python中是 [内置函数](https://docs.python.org/3/library/functions.html?highlight=sum#sum)在编写代码时应避免使用
- `sum` 在 Python 中是 [内置函数](https://docs.python.org/3/library/functions.html?highlight=sum#sum)在编写代码时应避免将其用作变量名
- Python 中没有 `++``--` 运算符,需要使用 `+=``-=` 对变量进行自增或自减。

### 差异速览
Expand Down

0 comments on commit a1bfc5f

Please sign in to comment.