Write a Python program to find area of a rectangle using function.
Answers
Answered by
383
♣ Qᴜᴇꜱᴛɪᴏɴ :
Write a program to input length and breadth of a rectangle .Calculate and print it's area and perimeter (Phyton chapter)
★═════════════════★
♣ ᴄᴏɴᴄᴇᴘᴛ :
First we need to take input from user asking his/her for lenght and then breadth. Then we need to address how to calculate area and perimeter. It's done, Time to print !!!!
★═════════════════★
♣ ʀᴇQᴜɪʀᴇᴅ ᴄᴏᴅᴇ :
l =int(input("Length : "))
b =int(input("Breadth : "))
area = l*b
perimeter = 2*(l+b)
print("Area of Rectangle : ",area)
print("Perimeter of Rectangle : ",perimeter)
Attachments:
![](https://hi-static.z-dn.net/files/d74/02d7997e070bb486e503686c85b769cf.png)
Answered by
1
Answer:
l = float(input("Enter the length of the rectangle:"))
b = float(input("Enter the breadth of the rectangle:"))
area = l*b
print("The area of the rectangle is", area)
Similar questions