Input validation is not part of the task, it's guaranteed your function receives a non negative integer. Changing the task after 100k completions won't happen.
I would like to suggest some test cases:
test.assert_equals(Descending_Order("1.0"), 1)
test.assert_equals(Descending_Order("a"), None)
test.assert_equals(Descending_Order("1.1"), None)
test.assert_equals(Descending_Order([]), None)
I'm glad I never took a job interview in front of you ;-)
Any R coder that uses return() at the end of their function should automatically fail the test.
This comment is hidden because it contains spoiler information about the solution
I wasn't aware of that. Only been on the site about 2 hours. Thank you for correcting me.
Input validation is not part of the task, it's guaranteed your function receives a non negative integer. Changing the task after 100k completions won't happen.
I would like to suggest some test cases:
test.assert_equals(Descending_Order("1.0"), 1)
test.assert_equals(Descending_Order("a"), None)
test.assert_equals(Descending_Order("1.1"), None)
test.assert_equals(Descending_Order([]), None)