Two rectangles
Input
sum(r.area() for r in make_rectangles([(2,3),(4,5)]))
Output
26
Areas are 6 and 20; sum is 26.
Full lesson preview
Create a simple Rectangle class and a helper that builds many instances from input data.
Problem statement
Task
Examples
Input
sum(r.area() for r in make_rectangles([(2,3),(4,5)]))
Output
26
Areas are 6 and 20; sum is 26.
Input format
Output format
Constraints
Samples
Input
sum(r.area() for r in make_rectangles([(7,6)]))
Output
42
Single rectangle area 7*6 = 42.