Question: Assume that you are testing a function called count digits (), which accepts any integer as a parameter. The function is supposed to return
Assume that you are testing a function called count digits (), which accepts any integer as a parameter. The function is supposed to return the number of digits in that integer. For example, for an argument of 142, the function should return 3. However, suppose you know that the function contains an error, and that there will be some arguments for which the function will return the wrong value. Write a function call to count_digite() using an argument that you think would make a good test value. You may have to try s everal different test values before you find one that reveals the error.
Step by Step Solution
3.34 Rating (154 Votes )
There are 3 Steps involved in it
To test the countdigits function and potentially reveal an error you can choose a test value that in... View full answer
Get step-by-step solutions from verified subject matter experts
