loading...

re: Daily Coding Problem #1 VIEW POST

FULL DISCUSSION
 

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")

Code of Conduct Report abuse