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:
2024-03-31 21:20:16 +00:00
5 changed files with 37 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
import math
def area(r):
return math.pi * r * r
def perimeter(r):
return 2 * math.pi * r
+10
View File
@@ -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
+5
View File
@@ -0,0 +1,5 @@
def area(a, b):
return a * b
def perimeter(a, b):
return 2 * (a + b)
+7
View File
@@ -0,0 +1,7 @@
def area(a):
return a * a
def perimeter(a):
return 4 * a
+5
View File
@@ -0,0 +1,5 @@
def area(a, h):
return a * h / 2
def perimeter(a, b, c):
return a + b + c