3 ms·
If I were asked I might just go verbally, well; for i from 0 to 100, if i mod print fizz, else if etc. Followed by test it, check loop conditions, edge cases, r
by animal531 10y ago
If I were asked I might just go verbally, well; for i from 0 to 100, if i mod print fizz, else if etc. Followed by test it, check loop conditions, edge cases, representative number of ifs and prints for each type; put a header on the code with a description and we're done.
For me it's not about getting it 100% correct, its about showing that you can do basic programming and know how computers work, followed by the simple breaking down of a concept into a program.
The rest I consider details. Even if you implemented it 100%, its so simple that it doesn't nearly guarantee that you will do the same for a large program. And if you don't get it 100% correct, as long as you roughly indicate some fields where you're going to test for issues I'd be more than happy about it. Thereafter the human factor/generics, for example did it take you 30 minutes to think this up or was it pretty much rapid-fire? How learned of a response is programming to you?
But as to your question; people don't really like being showed up, but that works well for filtering for you as well. If he hated it then it might very well not be a place/person you want to work with.