Results for “for”

Showing 131–136 of 136

  1. Challenge

    Sensor ID parts

    …the unit next to it. Take the ID apart, then make it work for subsystems whose names contain a dash themselves. Subsystem and number Split the ID at the dash. Print the subsystem, the unit number as…

    Write the code Medium 2 stages strings split rsplit int
  2. Challenge

    Unit mix-up

    The flight dynamics team is checking the plan for a transfer to the Moon. One leg comes from a contractor's planning tool, and the total doesn't look right. Predict what the code prints, find the leg…

    Fix the code Easy 3 stages units conversion constants debugging
  3. Challenge

    Running totals

    …one variable up to date instead of creating a new one for each step. Predict how -= and += change a value, follow the fuel through a whole sequence, then track a battery yourself. Predict and run…

    Write the code Easy 3 stages variables -= += updating values
  4. Challenge

    Names that explain

    Somebody wrote a quick calculation for the cargo module and called the variables a , b , x2 and tmp . The program works, but nobody, including its author a month from now, can tell what it calculates…

    Fix the code Easy 3 stages variable names refactoring readability clean code
  5. Challenge

    Read the error

    …on Python One won't run. Don't read the whole file looking for the problem. Run it, read the line number in the error, and go straight there. Find the line Run the script. Python stops before printing…

    Fix the code Easy 3 stages SyntaxError IndentationError error messages debugging