Question: Assume that you are writing a test driver for a function called count_diffs (), which accepts two strings S1 and 52 as parameters. The
Assume that you are writing a test driver for a function called count_diffs (), which accepts two strings S1 and 52 as parameters. The function is supposed to return the count of how many letters are different between the two strings. For example, the number of differences between "aaaaa" and "aagag" is 2, because there are two places where the strings are not exactly the same. Assume also that two variables called test_valuel and test_value2 have already been initialized with values of "atgcaacg" and "atacagcc"... Write a block of code to test the count_diffs () function using test_valuel and test_value2 together as the test case. The code should print out "error found" if the test detects an error, and otherwise prints nothing at all. Additional Notes: . test_value2 and test_value1 should not be modified Regarding your code's standard output, CodeLab will check for case errors but will ignore whitespace (tabs, spaces, newlines) altogether.
Step by Step Solution
3.48 Rating (155 Votes )
There are 3 Steps involved in it
Below is a Python script that demonstrates how you can test this function using the giv... View full answer
Get step-by-step solutions from verified subject matter experts
