Introdução ao Python para finanças
Adina Howe
Professor
Guarde informações para usar no código
msft_stock, interest_rate, bondsinterest_rate = 0.05
Nomes de variáveis
class ou type) e devem ser evitados# Correto
day_2 = 5
# Incorreto: nome começa com dígito
2_day = 5
$$ \text{Price to earning ratio} = \frac{\text{Market price}}{\text{Earnings per share}} $$
price = 200 earnings = 5pe_ratio = price / earningsprint(pe_ratio)
40
Introdução ao Python para finanças