Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

print ( ' - - Test 1 - - ' ) a = set ( [ 1 , 2 , 1 0 , 1 1

print('-- Test 1--')
a = set([1,2,10,11])
b = set([2,5,8,10])
c = set([1,2,5,8])
assert not check_sum_exists(a, b, c,12), f'Failed Test 1: your code returned true when the expected answer is false'
print('Passed')
print('-- Test 2--')
a = set([1,2,10,11])
b = set([2,5,8,10])
c = set([1,2,5,8,11])
assert check_sum_exists(a, b, c,12), f'Failed Test 2: your code returns false but note that 1 in a +10 in b =11 in c '
print('Passed')
print('-- Test 3--')
a={1,4,5,7,11,13,14,15,17,19,22,23,24,28,34,35,37,39,42,44}
b={0,1,4,9,10,11,12,15,18,20,25,31,34,36,38,40,43,44,47,49}
c={3,4,5,7,8,10,19,20,21,24,31,35,36,37,38,39,42,44,46,49}
assert check_sum_exists(a, b, c,50), f'Failed Test 3: your code returns False whereas the correct answer is true eg.,4+0=4'
print('-- Test 4--')
a={98,2,99,40,77,79,87,88,89,27}
b={64,66,35,69,70,40,76,45,12,60}
c={36,70,10,44,15,16,83,20,84,55}
assert not check_sum_exists(a, b, c,100), f'Failed Test 4: your code returns True whereas the correct answer is False'
print('All Tests Passed (15 points)!')

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions

Question

Describe alternative paid time off policies.

Answered: 1 week ago

Question

Describe customized benefit plans.

Answered: 1 week ago