

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 5
click for more info
Not enough gems
Cost: 6 gems
1: Number Sum
incomplete
2: Find Min
incomplete
3: Remove Non-Integers
incomplete
4: Factorial
incomplete
5: Area Sum
incomplete
6: List Division
incomplete
7: Join Strings
incomplete
8: Unit Tests
incomplete
9: Fix a Failing Test
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
The area of a rectangle is calculated by multiplying its height and width. For example, the area of a rectangle with a height of 3 and a width of 5 is:
3 * 5 = 15
Complete the area_sum() function. It accepts a list of rectangles, where each rectangle is a dictionary that has the following structure:
rectangle: dict[str, int] = {"height": 5, "width": 6}
The function should calculate the area of each rectangle and return the sum of all the areas.