Results for “variables”

Showing 31–40 of 53

  1. Challenge

    Silent branch

    …returns None for Scrub because that branch sets a variable but never returns it. Predict the last line, find which statuses give None, make every path return, then write a function where every path…

    Fix the code Easy 3 stages functions return None branches
  2. Article Python Fundamentals

    How to Start Programming in Python Fast

    …is what sets it apart. Let's look at some basic elements: Variables and Data Types In Python, variables are like containers that hold data. You don't need to declare a variable's type explicitly…

  3. Challenge

    Unit mix-up

    …thousands. Investigate and modify Investigate. Find the variable that holds a distance in a different unit and store its name, as text, in odd_one_out . Then convert it: one mile is 1.609344 km. Store…

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

    Legacy script

    …It repeats the same twelve lines for each engine, the variables are called t , m and s , and a fourth engine is being installed next month. Restructure it without changing a single character of what…

    Fix the code Hard 2 stages project refactoring functions testing
  5. Challenge

    Copy-pasted blocks

    …of (name, level) pairs and one loop. Keep the three level variables, which come from telemetry. The output must stay exactly the same: Tank A: 78.3% Tank B: 12.5% LOW Tank C: 46.0% Build tanks =…

    Fix the code Medium 2 stages refactoring for loop tuples lists
  6. Challenge

    Roster changes

    …puts x at index 1, and crew.remove(x) deletes it. Use the variables, not the names. Reassigned After the changes, the newest member, now last in the list, is reassigned to the space station. Take them…

    Write the code Easy 2 stages lists append insert remove