Computer Science, asked by chavanshruti87, 9 months ago

Given length L and breadth B of N rectangles. The task is to return maximum area of the rectangle.
Input : Number of Rectangles, Length and Breadth of N Rectangles
Output: Maximum Area of Rectangle
Your task is to declare the function Calculate_Area() which returns the maximum area.
Input:
1
3
1 2 3 4 5 6
Output:
30

Answers

Answered by pravupritam
0

Answer:

3

Explanation:

Answered by varshamittal029
0

Concept:

A function is a code block To execute a function it is required to invoke it. Parameters are data that can be passed into a function. As a result, a function can return data.

Given:

N number of rectangles are there. Input length and breadth of the rectangles. Find the maximum area from all of the rectangles.

Find:

Write a program for the given statement.

Solution:

N=int(input('Enter number of rectangles:'))

list_area=[]

def Calculate_Area():

   for i in range(N):

       a=int(input('Enter length: '))

       b=int(input('Enter breadth: '))

       area=a*b

       list_area.append(area)

Calculate_Area()

maximum_a=max(list_area)

print("Maximum area is : ",maximum_a)

Output:

Attachments:
Similar questions