Results for “debug”

Showing 1–10 of 42

  1. Challenge

    Logging instead of print

    The tank check is full of prints left over from debugging. Replace them with logging calls at the right levels, so debug records stay hidden until switched on, then give the fuel code its own named…

    Fix the code Medium 2 stages logging debug info warning
  2. Challenge

    Wrong line commented out

    A real check is commented out and a debug line is left on. Use # comments to put the pre-flight checklist script back in order. A beginner Python challenge on comments.

    Fix the code Easy 2 stages comments debugging print
  3. Article Python Fundamentals

    Python print() Function

    …satellite data, showing telescope coordinates, or debugging your space simulation, mastering the print() function is your first step toward becoming a space programmer. Why is the print() function…

  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
  5. Challenge

    Catch what you expect

    A bare except: reports every fuel reading as bad, because it also catches a NameError from a typo. Predict the last line, find the hidden error, catch only ValueError and fix the typo, then write a…

    Fix the code Medium 3 stages errors try except ValueError
  6. Challenge

    Read the traceback

    A Python program stops with a traceback. Read it from the bottom up to find the error, the function and the line, fix the bug there, then follow a longer traceback through four calls to a second bug.

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

    Launch counter crash

    record_launch() adds 1 to a global counter and stops with an UnboundLocalError. Predict it, find out why Python treats the name as local, fix it by passing the count in and returning the new one, then…

    Fix the code Medium 3 stages functions scope UnboundLocalError global