forked from SheenamYadav/mca101_vidul
-
Notifications
You must be signed in to change notification settings - Fork 0
/
area rect with ids
35 lines (30 loc) · 991 Bytes
/
area rect with ids
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
31
32
33
34
35
def areaRectangle(length,breadth):
'''
objective: To Compute area of a rectangle
input parameters
length : length if the rectangle
breadth: breadth of the rectangle
approach: multiply length and breadth of the rectangle
return value : Area of the rectangle
'''
area = length * breadth
return area
def main():
'''
objective : To compute area of a Rectangle
user input :
length: length if the rectangle
breadth: breadth of the rectangle
approach:
'''
length = int(input("enter length of rectangle "))
breadth= int(input("enter breadth of rectangle "))
print ("length of rectangle : ", length)
print ("breadth of rectangle : ", breadth)
print ('id(length) ', id(length) )
print ('id(breadth) ', id(breadth))
print ('areaRectangle : ' , areaRectangle(length,breadth))
print ('End of output')
if __name__ == '__main__':
main()
print('End of program')