基础知识
# 基础知识
# 数字与操作符
3 + 2 # Output is 5
3 * 5 # Output is 15
3 / 2 # Ooutput is 1.5
3 // 2 # Output is 1
-3 // 2 # Output is -2
3 ** 2 # Output is 9
1
2
3
4
5
6
2
3
4
5
6
Floor division
The //
operator is called floor division (opens new window), which is the mathematical division that rounds down to nearest integer
编辑 (opens new window)
上次更新: 2020/08/14, 3:08:00