Skip to content

Conversation

randdane
Copy link
Contributor

I feel rather good about figuring this one out, but the last append outside of my for loop just doesn't feel right. I would appreciate any feedback.

@randdane randdane changed the title [Python] Challenge 6 submission [Python] Challenge 6 (Unreviewed) Jan 12, 2017
@Loran425
Copy link
Contributor

Looks good for the most part. There is an edge case where a single number is not a range. so 11->11 would be an invalid output. but other than that your code is looking good.

I had to implement the end of loop thing also. Another way you could do it is append a 0 to end of the list of numbers so you know it will fail and run your append condition at the end of a list.

To make life easier as you go further you might look into unit tests. These make it easy to run identical tests when you change your code accounting for edge cases and the like.

  • Code Correctness
  • Code Style
  • Code Documentation
  • Path Structure
  • Merge Pull Request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants