Computer Science, asked by galaxy24, 4 months ago

Program 21:- Write a program to find the area ànd perimeter of a rectangle using *(),* i.e. the parenthesis operator.

Answers

Answered by 0RPS0
3

Length = eval(input('Enter the Length of Rectangle:'))

Breadth = eval(input('Enter the Breadth of Rectangle:'))

print('------------')

print('Length = ',Length)

print('Breadth = ',Breadth)

print('------------')

print('Area = ', Length * Breadth)

print('Perimeter = ',2 * (Length + Breadth))

*Output*

Enter the Length of Rectangle: 10

Enter the Breadth of Rectangle: 20

------------

Length = 10

Breadth = 20

------------

Area = 200

Perimeter = 60

Similar questions