Dremendo Tag Line

Print area of a rectangle in Python

print() - Question 15

In this question, we will see how to print the area of a rectangle in python programming using the print() function. To know more about print() function click on the print() function lesson.

Q15) Write a program in python to find the area of a rectangle if length is 10 and breadth is 5.

Formula: area = length * breadth

Program

print('Length=10')
print('Breadth=5')
print('Area={}'.format(10*5))

Output

Length=10
Breadth=5
Area=50
video-poster