Python 金融入門

Python 金融入門

Adina Howe

Professor

接下來你會學到……

直方圖

本益比

Python 金融入門

為什麼用 Python 做金融?

  • 易學且彈性高
    • 通用用途
    • 動態
    • 高階語言
  • 可與其他語言整合
  • 開放原始碼
    • 人人可用

 

python 標誌

Python 金融入門

$$ Datacamp 螢幕截圖

Python 金融入門

常用數學運算子

運算子 意義
+ 加法
- 減法
* 乘法
/ 除法
% 餘數(除法的餘數)
** 次方
Python 金融入門

常用數學運算子

# Print the sum of 8 and 4
print(8 + 4)
12
# Print 8 divided by 4
print(8 / 4)
2
  • 明確使用 print()
Python 金融入門

有沒有註解?

# Print 8 divided by 2
print(8 / 2)

# Print 2 raised to the power of 2
print(2**2)

# Print 1.0 add 0.10
print(1.0 + 0.10)
Python 金融入門

一起來練習吧!

Python 金融入門

Preparing Video For Download...