Results for “types”

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

    Decimal comma

    An operator types 42,5 and float() crashes with a ValueError. Predict it, find out why, accept both commas and dots with replace(), then read pressures written like 1 013,25.

    Fix the code Easy 3 stages strings replace float ValueError
  3. Challenge

    Safe number input

    The burn length is typed in by hand, and a typo stops the program with a ValueError. Catch it with try and except, keep asking until the input is a number, then also turn away zero and negative…

    Write the code Easy 2 stages errors try except ValueError
  4. 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