Computer Science, asked by answerquestion, 2 months ago

Take two integer variables, and calculate the area of a rectangle. (python)

Answers

Answered by SinghPremveer
1

Answer:

print('Enter dimensions (in cm) to calculate area of the rectangle')

x=input('Length: ')

y=input('Breadth: ')

AREA = int(x)*int(y)

print()

print('Area of the reactangle (in sq.cm):',AREA)

Explanation:

x, y will take input.

Input is in 'string' type so, during multiplication we type-casted it to integer.

Similar questions