Skip to content

Commit 7f8f4cc

Browse files
authored
Create close_far.py
1 parent e5b7cb3 commit 7f8f4cc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Logic-2/close_far.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
def close_far(a, b, c):
2+
if abs(a-b) > abs(a-c) :
3+
b = b + c
4+
c = b - c
5+
b = b - c
6+
7+
if abs(a-b) <= 1 and abs(a-c) >= 2 and abs(b-c) >= 2 :
8+
return True
9+
return False

0 commit comments

Comments
 (0)