Commit 5e34cf47 by ajil.k

updated assignment1

parent 34007122
......@@ -11,10 +11,13 @@ class Circle:
return area
except TestException:
print("\nException Occurred\n")
finally:
print("---------------------------")
def perimeter_circle(self):
try:
perimeter = 2 * 3.14 * self.radius
return perimeter
except TestException:
print("\nException Occurred\n")
finally:
print("---------------------------")
\ No newline at end of file
......@@ -14,10 +14,13 @@ class Rect:
return area
except TestException:
print("\nException Occurred\n")
finally:
print("---------------------------")
def perimeter_rect(self):
try:
perimeter = 2 * (self.length + self.breadth)
return perimeter
except TestException:
print("\nException Occurred\n")
finally:
print("---------------------------")
\ No newline at end of file
......@@ -11,6 +11,8 @@ class Square:
return area
except TestException:
print("\nException Occurred\n")
finally:
print("---------------------------")
def perimeter_square(self):
try:
......@@ -18,3 +20,5 @@ class Square:
return perimeter
except TestException:
print("\nException Occurred\n")
finally:
print("---------------------------")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment