Results for “python operators”

Showing 11–20 of 29

  1. Article Python Fundamentals

    Python If/Else for Beginners

    …conditions: Comparisons: == , != , < , > , <= , >= Logical operators: and , or , not Membership: in , not in Truthiness: values like 0 , "" , [] , None , False are treated as False in conditions…

  2. Challenge

    Flag from config text

    …print: Firing the main engine Make: Settings typed by hand Operators edit this config by hand, so the telemetry setting can be yes , no , true or false , in any case and with stray spaces. Yes and…

    Fix the code Easy 3 stages bool if else config
  3. Challenge

    Config loader

    …downlink module reads its settings from a JSON file that operators edit by hand. Last week someone typed "256" in quotes, misspelt a key and set twelve retries, and the module started with the wrong…

    Write the code Hard 3 stages project json configuration validation
  4. 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
  5. Challenge

    Airlock permissions

    …trust. Each action needs a set of permissions, from basic operator training to the commander's approval for opening the outer hatch, and the airlock's control panel checks them before it does…

    Write the code Medium 2 stages sets subset difference permissions
  6. Challenge

    Redact the access code

    …in its place: AUTH ok station=Esrange code=**********77AB operator=2 line.find(" ", start) searches for a space starting at index start , so it finds the space after the code, not the first one in the…

    Write the code Medium 2 stages strings slicing len replace
  7. Challenge

    Missing field

    …given a pad yet. Instead of a board with one blank, the operators got an error and no board at all. Predict what happens, find out what the dict really holds, fix it, then build a board that copes…

    Fix the code Easy 3 stages dictionaries KeyError get default values