Results for “lower”

Showing 1–10 of 17

  1. Challenge

    Normalise a command

    Turn " Launch " into launch with strip() and lower(), check it against the command list, then accept underscores and dashes too, so commands match however operators type them.

    Write the code Easy 3 stages strings strip lower replace
  2. Challenge

    Sign-up cleanup

    …for the analogue mission: trim and capitalise names, lower-case emails, then reject sign-ups with no name or a broken email and drop duplicates by email, saying why for each one.

    Write the code Medium 2 stages project strings strip split
  3. Challenge

    Sorted copy

    …names like de Vries and van Dijk correctly with key=str.lower.

    Write the code Easy 2 stages lists sorted sort key
  4. Challenge

    File name from data

    …them, and safe, so they work on every operating system: lower case, no spaces, the sensor first and then the date. Build the file names from the data, then a folder path for each sensor. From an ID…

    Write the code Easy 3 stages strings f-strings lower replace
  5. Challenge

    Validate a command

    …: Starting the sequence Normalise the answer with strip().lower() straight away, then compare it in an if / elif chain, with else at the end. Helpful errors Make the errors helpful. For an empty…

    Write the code Easy 2 stages if elif else input
  6. Challenge

    Command parser

    …command: dance REJECTED "": empty command text.strip().lower().split() gives the words. Converting the length can raise its own ValueError : catch it and raise yours, with a clearer message. set mode…

    Write the code Medium 2 stages project parsing strings split
  7. Challenge

    Alert level

    …From 400 °C it's WARN, from 450 °C CRITICAL, anything lower is OK. For 412.5: WARN Check the most serious level first: if for CRITICAL, elif for WARN, else for OK. "From 400" includes 400 itself, so…

    Write the code Easy 2 stages if elif else comparisons
  8. Challenge

    Strings don't change

    …what crate[1:] gives, as text, in rest . Then put crate.lower() on a line of its own, print crate , and store whether it is still "P0042" , True or False , in unchanged . Remove the lines you added…

    Fix the code Easy 3 stages strings immutability slicing TypeError
  9. Challenge

    Readings summary

    …team gets a summary of the temperature readings: the lowest, the highest and the average. Nobody reads five hundred numbers; everybody reads the summary. Summarise the readings with Python's built-in…

    Write the code Easy 2 stages lists min max sum