Computer Science, asked by abcxyz13, 6 months ago

2. Write a program to accept length and breadth of a rectangle from the user in decimals and display its area and perimeter.
topic python

Answers

Answered by vijayghore
7

Answer:

def areaRectangle(a, b):

   return (a * b)

 

def perimeterRectangle(a, b):

   return (2 * (a + b))

 

# Driver function

a = int(input("Enter length"))

b = int(input("Enter breadth"))

print ("Area = ", areaRectangle(a, b))

print ("Perimeter = ", perimeterRectangle(a, b))

Similar questions