DEV Community

loading...

Discussion on: Daily Challenge #281 - Area or Perimeter

Collapse
peter279k profile image
peter279k

Here is the simple solution with Python:

def area_or_perimeter(l , w):
    if l == w:
        return l * w
    return (l + w) * 2