Skip to main content
5 events
when toggle format what by license comment
Aug 15 at 20:57 history edited kcw78 CC BY-SA 4.0
modified code and added clarified comments
Aug 14 at 17:55 comment added UpAndAdam thanks for that tip. i only went there since he was using a regex (rather poorly).. i'm kind of surpried they dont teach reg ex for this assignment though. but it is still doable. in roughly the fasion you are doing.
Aug 14 at 16:22 comment added kcw78 Thanks, yeah it's a balance to share code without giving away the answer. I tried to thread the needle -- the if/elif/else block outlines the thought process without solving the problem. :-) (And, I just realized I left a line I intended to delete.) A quick note on regex: This is PSet 3, and Regular Expressions aren't covered (in depth) until Lecture 7. So, most students will probably use string manipulation methods.
Aug 14 at 15:20 comment added UpAndAdam a good more explicit statement of what i was suggesting. i was trying to make him think about it more then spelling it out this verbosely but good job introducing the logical branch based on seperator tokens and then also mentioning further input tests. if anyone upvotes mine they should upvote yours as well. I will upvote yours. Note that you can do all of your input tests in exactly two regex comparisons.
Aug 13 at 16:28 history answered kcw78 CC BY-SA 4.0