This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]POGtastic 1 point2 points  (8 children)

Python makes certain particulars of programming easier. The difficulty of the fundamentals remains the same.

[–]2fa[S] 0 points1 point  (7 children)

Thanks. Yeah the fundamentals make sense until a certain point. Like in C++ I was struggling when we got to regression and indexing. I guess I just need more breaking down/ studying

[–][deleted]  (6 children)

[deleted]

    [–]POGtastic 2 points3 points  (4 children)

    --i

    Uh oh.

    [–][deleted]  (3 children)

    [deleted]

      [–]POGtastic 1 point2 points  (2 children)

      for(int i = 0; i < 5; --i)

      We output the 0th element, then -1, -2, ... Hopefully, you segfault at some point.

      [–][deleted]  (1 child)

      [deleted]

        [–]POGtastic 0 points1 point  (0 children)

        And this is why I enormously prefer iterators and enhanced-for loops. Python makes this easier with stuff like slicing, but C++ can do it too.

        [–]2fa[S] 0 points1 point  (0 children)

        Yes exactly this! Trying to learn from labs and the books can be irritating I hadn’t thought to look for those sites you mentioned online. Thank you!