Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def perimeter(l, b):
- return 2 * (l + b)
- def area(l, b):
- return l * b
- length = float(input("Enter the length of the rectangle: "))
- breadth = float(input("Enter the breadth of the rectangle: "))
- p = perimeter(length, breadth)
- a = area(length, breadth)
- print(f'A {length} by {breadth} rectangle has an area of {a} and a perimeter of {p}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement