Answer:
No
Explanation:
Every time you finish a function you should test it with a wide variety of inputs, trying to cover as many logical cases as possible; if you skip this step you could end thinking that your code is correct because it performs well in one test when it is not, that is exactly the case for this code, to understand why you can test it with these inputs:
In conclusion, you don't have control over what the user is going to input. For this reason, you should test every logical case and make changes to your code accordingly to the results.