Community member

OllieGrant

Member since May 2025 · last post 24 Oct, 13:43

Counts public posts in this language only.

Latest threads

  1. 9points
    4
  2. 6points
    5
  3. 9points
    4
  4. 2points
    5
  5. 11points
    4
  6. 3points
    4
  7. 2points

    sep="," still adds spaces?

    Solved

    OllieGrant · 25 Sep, 23:12

    4
  8. 2points
    4
  9. 7points
    4
  10. 5points
    4

Latest comments

  1. In zip() silently dropping data scared me Solution

    Yes, that's a real-world trap. Since Python 3.10 you can use zip(..., strict=True), which raises an error when lengths differ. The challenge asks for an explicit len() check and warning, which is also nice for the user.

    24 Oct, 13:43 · 9

  2. In Stage 2 — removing the length check feels wrong

    One except for two problems. Clean.

    22 Oct, 09:18

  3. In Percentage shows 8734.0%

    Same trap as the hint says: format the value, don't change it.

    20 Oct, 11:53 · 1

  4. In Stage 2 — why is K to F refused? Solution

    It's not in the table, and the challenge's point is that the converter only does conversions it explicitly knows. Refusing with a clear error is safer than guessing. You could add it via Celsius, but that's beyond what…

    20 Oct, 07:51 · 3

  5. In Hidden tests plant bugs — how does that work?

    The checker runs your asserts against deliberately broken versions of the functions (like >= instead of >). If your tests still pass on a broken version, they didn't catch the bug. So you need tests on the exact boundar…

    18 Oct, 23:13 · 1

  6. In Percent with two decimals in a fixed-width column

    "text".center(WIDTH) for the title is neat. Didn't know strings had center().

    18 Oct, 11:33 · 1

  7. In "too many values to unpack" in stage 2

    Star unpacking is so useful with CSV rows.

    18 Oct, 08:00

  8. In UnboundLocalError: local variable referenced before assignment Solution

    It can read count, but count += 1 is an assignment, and any assignment inside a function makes that name local to the whole function. So Python treats count as local, and it has no value yet when += tries to read it. Be…

    18 Oct, 07:34 · 9

  9. In KeyError when reading a key that may not exist

    Or check first: if "timeout" in config:. .get() is usually shorter.

    15 Oct, 15:40

  10. In The fifth bug — runs but wrong decision Solution

    Look at how the decision variable gets updated in the loop. A common bug is overwriting it for each sensor, so only the last sensor decides. Any out-of-range reading should make it NO GO and nothing should set it back.

    15 Oct, 07:48 · 8

Log in to ask questions, comment and vote.

Log in Create account