Untitled

  1. integer : 整數
  2. float : 浮點數

print(10 - 5)
print(10 * 5)
print(10 / 5)
print(10 % 5) # mod operater 餘數0
print(10 % 3)
print(2 ** 3) #指數

--------------------------------------

[Running] python -u "d:\\2022_python_全攻略\\tempCodeRunnerFile. Operations for Numbers in Python"
5
50
2.0
0
1
8

[Done] exited with code=0 in 0.205 seconds

參考資料:

Python print()用法及代碼示例

顧名思義,python print() 函數用於將 Python 中的 Python 對象打印為標準輸出。

用法:print(object(s), sep, end, file, flush)

參數: