Community member

SamPrice

Member since September 2025 · last post 25 Oct, 18:59

Counts public posts in this language only.

Latest threads

  1. 10points
    4
  2. 2points
    5
  3. 7points
    4
  4. 9points

    Why no spaces in file names?

    Solved

    SamPrice · 5 Oct, 12:58

    4
  5. 1points
    4
  6. 8points
    5
  7. 4points
    4
  8. 11points
    4
  9. 2points
    4
  10. 6points

    Real stations!

    Solved

    SamPrice · 17 Sep, 07:11

    4

Latest comments

  1. In Stage 2 — why reverse the loops?

    Great 2D exercise. Grids appear in so many problems.

    25 Oct, 18:59 · 2

  2. In Book or videos — what worked for you?

    Python Crash Course here. The projects at the end are a nice bridge to real code.

    24 Oct, 12:00 · 1

  3. In [[]] * 3 behaves weirdly

    [0] * 3 is fine because numbers are immutable. The problem is only with mutable things like lists or dicts.

    23 Oct, 11:28 · 6

  4. In Stage 2 — why separate ifs instead of elif?

    Exactly why. elif stops after the first match. For a checklist you want every failing rule reported, so each rule needs its own independent if.

    22 Oct, 22:17

  5. In What should be the next challenge theme?

    Rover on Mars: path planning, battery, terrain grids. Lots of loops and 2D lists.

    22 Oct, 16:04 · 3

  6. In Why does print need brackets? Old tutorial doesn't use them

    Your book is written for Python 2. In Python 3 print became a normal function, so it needs brackets like every other function call: print("Hello"). Python 2 has been unsupported since 2020, so I'd honestly put that book…

    22 Oct, 09:28 · 4

  7. In round(2.5) is 2?? Is this a bug?

    Accountants love this one 😄

    22 Oct, 09:18 · 5

  8. In Percentage shows 8734.0%

    {mass:,} was new to me. Very handy for big numbers.

    21 Oct, 22:56 · 1

  9. In LEGB rule — what does it stand for? Solution

    It's the order Python searches for a name: - Local — inside the current function - Enclosing — inside outer functions (for nested functions) - Global — the module level - Built-in — names like len, print First match win…

    21 Oct, 19:08 · 7

  10. In Stage 2 — split("-") breaks LIFE-SUPPORT-4 Solution

    Use rsplit with a max split of 1. It splits from the right, only once, so everything before the last dash stays together.

    21 Oct, 08:29 · 8

Log in to ask questions, comment and vote.

Log in Create account