From 8ba9aeb3cea847b63a91ac378a2a6db758682460 Mon Sep 17 00:00:00 2001 From: smartiqa Date: Thu, 4 Mar 2021 14:54:08 +0300 Subject: [PATCH] L-03: Circle and square added --- circle.py | 10 ++++++++++ square.py | 7 +++++++ 2 files changed, 17 insertions(+) create mode 100644 circle.py create mode 100644 square.py diff --git a/circle.py b/circle.py new file mode 100644 index 0000000..c3eb864 --- /dev/null +++ b/circle.py @@ -0,0 +1,10 @@ +import math + + +def area(r): + return math.pi * r * r + + +def perimeter(r): + return 2 * math.pi * r + diff --git a/square.py b/square.py new file mode 100644 index 0000000..0f98724 --- /dev/null +++ b/square.py @@ -0,0 +1,7 @@ + +def area(a): + return a * a + + +def perimeter(a): + return 4 * a