I disagree. I'd much rather debug code from a person who writes code in the second way than the first. For me, at least, posts like this are great little learning tools to help me understand the fundamentals better...
I'll admit, I went a bit overboard with the argparser. And I could have named the functions better. What I was looking to do with the second version was create a version that could relatively easily be updated for more complicated versions of the problem. For example if the interviewer wanted me to revise it so that it printed fizz on every multiple of 7.
If you have any suggestions on how I could simplify my code, I would be more than happy to potentially incorporate them into fizzbuzz3.
Well that's a way to over-engineer a simple programming test.
I disagree. I'd much rather debug code from a person who writes code in the second way than the first. For me, at least, posts like this are great little learning tools to help me understand the fundamentals better...
I second this, this shows the fundamentals and importance of clean code. Making it clean makes it readable for others.
I'll admit, I went a bit overboard with the argparser. And I could have named the functions better. What I was looking to do with the second version was create a version that could relatively easily be updated for more complicated versions of the problem. For example if the interviewer wanted me to revise it so that it printed fizz on every multiple of 7.
If you have any suggestions on how I could simplify my code, I would be more than happy to potentially incorporate them into fizzbuzz3.
This comment was not constructive. Please consider a more helpful/thoughtful way to provide feedback in future comments.