Basic Arithmetic Operations
Python handles mathematical operations intuitively. These operations form the foundation of all financial calculations.
Basic Operators
Loading Python Playground...
Power and Division Operators
Loading Python Playground...
Order of Operations
Python follows standard mathematical order (PEMDAS: Parentheses, Exponents, Multiplication/Division, Addition/Subtraction):
Loading Python Playground...
Real Financial Calculations
Calculating Returns
Loading Python Playground...
Compound Interest Formula
The compound interest formula is: FV = PV x (1 + r)^n
Loading Python Playground...
Practice: Simple Investment Calculator
Loading Python Exercise...
Practice: Position Value Calculator
Loading Python Exercise...
Key Takeaways
+,-,*,/work as expected for addition, subtraction, multiplication, division**is for exponents (powers) - essential for compound growth//is floor division (rounds down)%is modulo (remainder)- Use parentheses to control order of operations
- The compound interest formula
PV x (1 + r)^nis foundational in finance
Next, we'll learn about lists - how to store collections of data like multiple stock prices!

