Results for “keys”

Showing 1–10 of 20

  1. Challenge

    Missing field

    …the API hasn't assigned a pad yet. Predict it, check the keys with in, fix it with get() and a default, then print a list of launches with defaults for any missing field.

    Fix the code Easy 3 stages dictionaries KeyError get default values
  2. Challenge

    Alert deduplicator

    The monitoring system raises the same alert over and over. Group repeats of an alert that come within 60 seconds of the first into one line with a count, in the order they first appeared, then add the…

    Write the code Hard 2 stages project dictionaries tuples as keys grouping
  3. Challenge

    Unit converter

    Write convert(), which looks a unit pair up in a table of factors, works the other way round by dividing, and refuses unknown units or missing pairs with a clear ValueError, then extend the table with…

    Write the code Medium 2 stages project dictionaries tuples as keys functions
  4. Challenge

    API response

    Print the name, provider and status of a launch from a dict shaped like a launch-API response, then list every field the response has with items(), the way you'd inspect an API you haven't used…

    Write the code Easy 2 stages dictionaries keys items JSON
  5. Challenge

    Line to record

    Extend the feed parser so it stores every reading as a dict with time, sensor, value and unit in a list of records, then let other code pick out one sensor's readings by key.

    Write the code Easy 2 stages dictionaries lists parsing records
  6. Challenge

    JSON out

    …keep the station's Polish letters readable and sort the keys so the files compare easily.

    Write the code Easy 2 stages json json.dumps modules import
  7. Article Mini projects

    Medical dispenser - Don’t trust the user

    …event_string = json.dumps(event_copy, sort_keys=True) expected_hmac = self._compute_hmac(event_string) if expected_hmac != stored_hmac: raise ValueError(f"HMAC verification failed at event {i}")…