Results for “python data types”

9 results

  1. Challenge

    File name from data

    …first and then the date. Build the file names from the data, then a folder path for each sensor. From an ID and a date Build the file name for this sensor's data: the ID in lower case, an underscore…

    Write the code Easy 3 stages strings f-strings lower replace
  2. Challenge

    Missing reading

    …level" so a sensor that didn't answer, None, prints NO DATA instead of crashing, without treating a real 0 as missing, then do the same for an empty field in a telemetry line.

    Write the code Medium 2 stages if else None is None
  3. Challenge

    Read the traceback

    …line just above it is where it happened. Fill in error_type , crash_function and crash_line at the end of the program, then fix the bug on that line so the program prints: Average: 695.0 K Fix the…

    Fix the code Easy 2 stages errors traceback KeyError TypeError
  4. Challenge

    Readings that won't add

    …readings to the flight computer as text, the way most data arrives from files, forms and networks. The code that adds them up looks right, but the total it prints makes no sense. Predict what it…

    Fix the code Easy 3 stages type conversion int float str
  5. Challenge

    Parse a telemetry line

    …split() gives text, so "412.5" + 273.15 would stop with a TypeError . Turn the value into a number, show it with its unit, and add the temperature in kelvin, with two decimal places: Time…

    Write the code Easy 2 stages strings split parsing csv
  6. Challenge

    Real JSON

    …thing any program does with it is turn that text into data. Do that step yourself with the json module, then deal with a response that didn't arrive in one piece. json.loads() The prints from "API…

    Write the code Easy 2 stages json json.loads modules import