write a Python programme to find area and perimeter of a rectangle based on users choise
Answers
Answer:
MARK ME AS BRAINLIEST
Explanation:
# Python3 code to find area
# and perimeter of rectangle
# Utility function
def areaRectangle(a, b):
return (a * b)
def perimeterRectangle(a, b):
return (2 * (a + b))
# Driver function
a = 5;
b = 6;
print ("Area = ", areaRectangle(a, b))
print ("Perimeter = ", perimeterRectangle(a, b))
#
♣ 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)