-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path3.area_rectangle.py
More file actions
30 lines (22 loc) · 913 Bytes
/
3.area_rectangle.py
File metadata and controls
30 lines (22 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
def areaRectangle( length , breadth ):
'''
objective : to calculate the area of a rectangle
approach : multiplying length and breadth together
parameteres : -> length : length of rectangle
-> breadth : breadth of rectangle
return value : area of the rectangle
'''
area = length * breadth
return area
def main():
'''
objective : to calculate the area of a rectangle
approach : taking length and breadth of rectangle as input from user and passing them to function areaRectangle
'''
length = int( input('Enter length of Rectangle : ') )
breadth = int( input('Enter breadth of Rectangle : ') )
area = areaRectangle( length , breadth )
print(' Length of Rectangle : ' , length)
print(' Breadth of Rectangle : ' , breadth)
print(' Area of Rectangle : ', area)
print(' End of main ')