Concept Flow - Arithmetic operators
Start
Read operands
Choose operator
Perform calculation
Store/Display result
End
This flow shows how arithmetic operators take two numbers, perform a calculation, and give a result.
a = 10 b = 3 sum = a + b product = a * b result = a / b
| Step | Expression | Operands | Operation | Result |
|---|---|---|---|---|
| 1 | a = 10 | - | Assign 10 to a | a=10 |
| 2 | b = 3 | - | Assign 3 to b | b=3 |
| 3 | sum = a + b | a=10, b=3 | Addition | sum=13 |
| 4 | product = a * b | a=10, b=3 | Multiplication | product=30 |
| 5 | result = a / b | a=10, b=3 | Division | result=3.3333333333333335 |
| Variable | Start | After Step 1 | After Step 2 | After Step 3 | After Step 4 | After Step 5 |
|---|---|---|---|---|---|---|
| a | undefined | 10 | 10 | 10 | 10 | 10 |
| b | undefined | undefined | 3 | 3 | 3 | 3 |
| sum | undefined | undefined | undefined | 13 | 13 | 13 |
| product | undefined | undefined | undefined | undefined | 30 | 30 |
| result | undefined | undefined | undefined | undefined | undefined | 3.3333333333333335 |
Arithmetic operators perform basic math on numbers. Common operators: + (add), - (subtract), * (multiply), / (divide). Operands are numbers or variables. Result is stored or used immediately. Division always returns a float in Python. Use parentheses to control order.