loading...

Discussion on: Daily Coding Problem #1

Collapse
krishnanandp profile image
KrishnanandP

This is a pythonic code:-

Only taking 3 factors for this problem

def num(k,a,b,c):
assert a + b or b + c or c + a == k
if a + b == k:
print("True")
elif b + c == k:
print("True")
elif c + a == k:
print("True")
else:
print("False")