Needs random tests
In Javscript I've added a funnction to fix that issue. For Python, I don't notice any instances where the result was incalculable.
Thanks for that - it's what I was doing... think it was the system at work playing up again :D
Maybe post your answer - be sure to mark it as a spoiler and I'll see if its the test cases or your code.
Sorry, it won't allow me to re-publish - server keeps timing out
I've added random tests
I'm unable to re-publish - server keeps timing out.
my solution is in Python, which has the same method for dealing with NaN as JS. I see other people have passed in python so it may just be me!
This comment is hidden because it contains spoiler information about the solution
This problem should explicitly call out that:
-An input of 0 should return None, not 0
-Inputs may be strings. When they are, the function must return None
Even if the code works, when submitting it gives this error
TypeError: Can't convert 'int' object to str implicitly