Results for “parameters”

Showing 21–26 of 26

  1. Challenge

    Extra log fields

    …and nobody wants a format_log() with fifty optional parameters. Let the function take whatever fields the caller has, then feed it fields from dicts. **fields Let format_log() take any extra keyword…

    Write the code Medium 2 stages functions **kwargs keyword arguments dictionaries
  2. Challenge

    Launch counter crash

    …. Modify. Pass the count into the function as a second parameter, return the new count, and store it at each call, without global . It must print: Lumen-3 launched, 1 today Tern-5 launched, 2 today…

    Fix the code Medium 3 stages functions scope UnboundLocalError global
  3. Challenge

    Log formatter function

    …level, msg): , with return f"..." inside, using its own parameter names. Then print(format_log(elapsed, level, message)) . One change for every line The function is now used for a whole orbit's…

    Fix the code Easy 2 stages functions def return refactoring