Merge branch 'new_features' into 'master'
New features See merge request tiutriumov.sm/task1-2!1
This commit was merged in pull request #1.
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
import math
|
||||||
|
|
||||||
|
|
||||||
|
def area(r):
|
||||||
|
return math.pi * r * r
|
||||||
|
|
||||||
|
|
||||||
|
def perimeter(r):
|
||||||
|
return 2 * math.pi * r
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Math formulas
|
||||||
|
## Area
|
||||||
|
- Circle: S = πR²
|
||||||
|
- Rectangle: S = ab
|
||||||
|
- Square: S = a²
|
||||||
|
|
||||||
|
## Perimeter
|
||||||
|
- Circle: P = 2πR
|
||||||
|
- Rectangle: P = 2a + 2b
|
||||||
|
- Square: P = 4a
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
def area(a, b):
|
||||||
|
return a * b
|
||||||
|
|
||||||
|
def perimeter(a, b):
|
||||||
|
return 2 * (a + b)
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
def area(a, h):
|
||||||
|
return a * h / 2
|
||||||
|
|
||||||
|
def perimeter(a, b, c):
|
||||||
|
return a + b + c
|
||||||
Reference in New Issue
Block a user