Question: The following code examine three variables - - x and y - - and prints the largest multiple of 1 5 among them. If none

The following code examine three variables -- x and y -- and prints the largest multiple of 15 among them. If none of them is a multiple of 15, it prints a message to that effect.
def largestMultiple(x,y):
"""
x and y are numbers
Returns the maximum number of x and y that is a multiple of 15.
If none of them is a multiple of 15, return None
"""
found15= False
largest =0
if x %15==0 :
largest = x
found15= True
if y %15==0 :
if not found15 :
largest = y
found15= True
elif y > largest :
largest = y
if found15 :
return largest
else :
return None
Assume that largestMultiple is called with numbers as arguments.
Which of the following test suites would make a path-complete glass box test suite for largestMultiple? (1 correct answer only)
Question 4 options:
Test Suite A: largestMultiple(20,10), largestMultiple(20,15), largestMultiple(30,60), largestMultiple(30,15), largestMultiple(30,45)
Test Suite B: largestMultiple(40,10), largestMultiple(40,30), largestMultiple(45,50), largestMultiple(45,15), largestMultiple(45,30)
Test Suite C: largestMultiple(40,10), largestMultiple(40,30), largestMultiple(45,10), largestMultiple(45,15), largestMultiple(45,40)
Test Suite D: largestMultiple(20,10), largestMultiple(20,15), largestMultiple(30,10), largestMultiple(30,15), largestMultiple(30,45)

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 Programming Questions!