Results for “type()”

Showing 1–10 of 40

  1. Challenge

    input() returns text

    …out the crew after the next docking. Whatever number you type, it crashes. Predict what happens, find out why input() is behind it, fix it, then write a packing tool that reads two numbers. Predict…

    Fix the code Easy 3 stages input int TypeError type conversion
  2. Challenge

    Readings that won't add

    …are written. Investigate and modify Investigate. Store the type of the readings in reading_type : int , float , str or bool . Modify. The readings arrive as text, so leave the two lines that set them…

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

    Flight software review

    A 40-line pre-burn check has five bugs: a syntax error, a type error, a wrong key, an index out of range and a reversed decision. Read each error to fix the four that crash, then find the one that…

    Fix the code Hard 2 stages project debugging SyntaxError TypeError
  4. 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