2 ms·
Like, on purpose? If you know what fizzbuzz is, then you can probably whiteboard it. It’s literally: ``` case $input when $input % 3 == 0: “Fizz” when $input
by nunez 6y ago
Like, on purpose? If you know what fizzbuzz is, then you can probably whiteboard it. It’s literally:
```
case $input
when $input % 3 == 0:
“Fizz”
when $input % 5 == 0:
“Buzz”
when ($input % 3 == 0 && $input % 5 == 0):
“Fizzbuzz”
end
```
- sobani 6y agoYou failed to return the numbers that are neither divisible by 3 nor by 5. Also I'm pretty sure your code will never return "Fizzbuzz", since 15 would already be matched by %3. It's quite ironic that you had all the time in the world to check your code and the ability to silently walk away when the pressure would've been too high and yet you included 2 obvious bugs in your 'proof' of how easy this is. Thank you for your time, but I'm afraid you would not be a good match for this position at this moment.
- nunez 6y agoFair enough!