All problems

Unequal Subplot Sizes With gridspec_kw

hardPythonMatplotlibGridSpec

Halewood Reporting lays out a report page with a main chart and a small supporting one beside it. Equal panels would imply the two carry equal weight, which is not the story: the left panel is the argument and the right is a footnote. The layout therefore gives the left panel twice the width of the right. Beneath the pair the report states the combined total, so a reader knows the two panels together account for everything.

Task: Print the total of both panels' values added together.

Input

Four lines. The first holds an integer n and the second holds n values for the wide panel, separated by single spaces. The third holds an integer m and the fourth holds m values for the narrow panel. Values may have decimals, and both counts are at least 1.

Output

One line holding the combined total, printed as Python prints the number it built: a total of seventy comes out as 70.0, never as 70 and never as 70.00.

Example:

Input:
3
10 20 30
2
5 5

Output:
70.0

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…