Question: Provide inputs ( you are not required to provide outputs ) to obtain the following levels of coverage in the listed code. Regardless of language

Provide inputs (you are not required to provide outputs) to obtain the following levels of coverage in the listed code. Regardless of language semantics, assume all conditions within each 'if' statement are executed (i.e., no short-circuiting).
Coverage levels required for regular credit are:
Line Coverage Only
Line and Branch Coverage Only
Conditional Coverage Only
Coverage levels to earn extra credit (up to 10 points) are:
Line, Branch, Condition, and Branch & Condition Only
Line, Branch, Condition, Branch & Condition, and Multiple Condition
Code to be tested in Python is:
def func(a, b, c):
branch_count =0
if (a <=1) or (b ==2) or (c !=3):
branch_count +=1
if (a ==1) and (b >=2) and (c >3):
branch_count +=1
return branch_count
Note: Please submit test case inputs in a list of parenthesis (e.g.,"(10,20,30)" for a, b, and c inputs respectively). Only integers may be passed in for a, b, and c. For example, the following format would be correct to submit (however the values are not correct):
Line Coverage:
(10,20,30)
(40,50,60)
Line & Branch Coverage:
(70,80,90)
Condition Coverage:
(100,200,300)
(400,500,600)
Line, Branch, Condition, and Branch & Condition Coverage:
(11,22,33)
(41,52,63)
(42,54,64)
=Line, Branch, Condition, Branch & Condition, and Multiple Condition Coverage:
(210,220,230)
(240,250,260)
If you do not submit the coverage values in this format, you will lose points.
If any coverage levels cannot be created, clearly describe why that is the case.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!