Introduktion till Python för finans

Introduktion till Python för finans

Adina Howe

Professor

Kommande avsnitt...

histogram

PE_ratio

Introduktion till Python för finans

Varför Python för finans?

  • Enkelt att lära sig och flexibelt
    • Generellt användbart
    • Dynamiskt
    • Högnivåspråk
  • Integreras med andra språk
  • Öppen källkod
    • Tillgängligt för alla

 

python logo

Introduktion till Python för finans

$$ Datacamp Screenshot

Introduktion till Python för finans

Vanliga matematiska operatorer

Operator Betydelse
+ Addition
- Subtraktion
* Multiplikation
/ Division
% Modulus (rest vid division)
** Exponent
Introduktion till Python för finans

Vanliga matematiska operatorer

# Print the sum of 8 and 4
print(8 + 4)
12
# Print 8 divided by 4
print(8 / 4)
2
  • Använd alltid print(){{4}} explicit
Introduktion till Python för finans

Vad är kommentarer?

# 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)
Introduktion till Python för finans

Nu kör vi en övning!

Introduktion till Python för finans

Preparing Video For Download...