--- Python 3.8.3 ---
a,b = [float(input()) for _ in range(2)]
r = int(input())
Perimeter = lambda x, y: (x+y)*2
Area = lambda x, y: x*y
print( Perimeter(a,b) if (r == 1) else Area(a,b))
Объяснение:
--- Python 3.8.3 ---
a,b = [float(input()) for _ in range(2)]
r = int(input())
Perimeter = lambda x, y: (x+y)*2
Area = lambda x, y: x*y
print( Perimeter(a,b) if (r == 1) else Area(a,b))
Объяснение: