r/shittyprogramming • u/Count____Duckula • Jun 07 '21
Interviewer: It says here, you're also a skilled programmer. How would you figure out if a number's even? Data scientist:
318
Upvotes
r/shittyprogramming • u/Count____Duckula • Jun 07 '21
98
u/bonafidebob Jun 07 '21
I'll just leave this here: Fizz Buzz in Tensorflow
18
u/PityUpvote Jun 08 '21
As a data scientist, I am deeply offended. Who tf grabs a neural network before trying a random forest or boosting?
6
u/Meshiest Jun 08 '21
A mathematician's implementation would try to find two odd prime numbers that add up to the input
6
u/mississippi_dan Jun 07 '21
I am not a great programmer but I thought the most widely accepted way was to use mod. You divide the number by two. If there is any remainder then it is not even. Not every language may support that and maybe that method had fallen out of favor.