Skip to main content
Heavily nested data 0 of 4 activities solved
  1. Heavily Nested Data Not yet read
  2. Heavily Nested Data: quiz Not yet read
  3. Total Rainfall Not yet solved
  4. Rainy, Cloudy Days Not yet solved
Next series Monster Mash
Heavily nested data

Rainy, Cloudy Days

Sign in to hand in your solution and get feedback.

from dataclasses import dataclass @dataclass class Measurement: amount: int automatic: bool @dataclass class WeatherOptions: raining: bool cloudy: bool snowing: bool @dataclass class Report: temperature: int rainfall: list[Measurement] weather: WeatherOptions @dataclass class Forecast: when: str where: str reports: list[Report]