Code Lab BetaBUILD. RUN. DISCOVER.

Code Lab is in development. New lessons and improvements are on the way. Progress can be deleted.

Challenges / 03

Shelves Report.

About 5–10 minutes
Your lesson
Given: pages = [120, 250, 180, 300] (book page counts). Use for to compute total_pages. Create report with keys: count = len(pages), total_pages, average = total_pages / len(pages), longest = max(pages). Print the four report values in that order. Expected output: 4 850 212.5 300

Data finale: loop + aggregates + report dict. Compute values from pages.

challenge_03.pyPYTHON
Loading the runtime… The first launch may take a little longer.
… 0/20000
CHECKSSTANDBY
01report is a dict with count/total_pages/average/longest keys
02total_pages is accumulated with for over pages
03console is exactly 4 / 850 / 212.5 / 300
…0/10000
ConsoleWrite the code. Bring it online.
›
Calculators BG — 50+ free online calculators | Калкулатори БГ