Example
Exponentiation and Roots
Operator ** for exponentiation and calculating roots in Python.
Showing 11–20 of 29
Example
Operator ** for exponentiation and calculating roots in Python.
Challenge
…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…
Challenge
…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…
Example
Checking if a set is a subset or superset of another set.
Challenge
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.
Challenge
…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…
Example
Operator ** allows accepting any number of keyword arguments.
Example
Operator * allows accepting any number of positional arguments.
Example
Operator // for floor division and % for remainder (modulo) in Python.
Challenge
The cargo console works: operators add and remove crates and check the hold. What it can't do is answer "what happened?" or take back a slip of the finger, and last week a crate was removed by mistake…