L-04: Update docs for calculate.py
This commit is contained in:
+17
-8
@@ -1,12 +1,21 @@
|
|||||||
|
|
||||||
|
# How to use calculator:
|
||||||
|
1. Run `python calculate.py`
|
||||||
|
2. Enter the figure name. Available are Circle, Square.
|
||||||
|
3. Enter the function: Area or Perimeter.
|
||||||
|
4. Enter figure sizes. Radius for circle, one side for square.
|
||||||
|
5. Get the answer!
|
||||||
|
|
||||||
# Math formulas
|
# Math formulas
|
||||||
## Area
|
## Area
|
||||||
- Circle: S = πR²
|
- Circle: `S = πR²`
|
||||||
- Rectangle: S = ab
|
- Rectangle: `S = ab`
|
||||||
- Square: S = a²
|
- Square: `S = a²`
|
||||||
- Triangle: S = (a + b + c) / 2
|
- Triangle: `S = sqrt(p * (p-a) * (p-b) * (p-c))` where p is semiperimeter
|
||||||
|
|
||||||
## Perimeter
|
## Perimeter
|
||||||
- Circle: P = 2πR
|
- Circle: `P = 2πR`
|
||||||
- Rectangle: P = 2a + 2b
|
- Rectangle: `P = 2a + 2b`
|
||||||
- Square: P = 4a
|
- Square: `P = 4a`
|
||||||
- Triangle: P = a + b + c
|
- Triangle: `P = a + b + c`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user