Results for “python data types”

Showing 21–28 of 28

  1. 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
  2. Article Mini projects

    Python Random Module

    …Python random module - our cosmic dice Our solar system data - our possible destinations Let's start by importing our space navigation tools: import random First, let's create our solar system…

  3. 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
  4. Article Python Fundamentals

    A Practical Guide to Getting Started with Programming

    …Software Development : Build applications and services Data Science : Analyze complex data sets AI/Machine Learning : Create intelligent systems Automation : Streamline business processes Web…

  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