1 Commits
Author SHA1 Message Date
Daniil.K 30494317cd L-04: Add rectangle.py 2021-03-31 15:33:42 +03:00
2 changed files with 9 additions and 5 deletions
+2 -5
View File
@@ -3,11 +3,8 @@
- Circle: S = πR²
- Rectangle: S = ab
- Square: S = a²
- Hexagon: S = ((3 * 3**0.5)/2)a**2
- Pentagon: S = 5/2*a*h
## Perimeter
- Circle: P = 2πR
- Rectangle: P = 2a + 2b
- Square: P = 4a
- Hexagon: P = 6a
- Pentagon: P = 5a
- Square: P = 4a
+7
View File
@@ -0,0 +1,7 @@
def area(a, b):
return a * b
def perimeter(a, b):
return (a + b)