Help me in solving CS09A problem

The code below is incorrect. Debug this code to solve this problem

for i in range(t):
X, Y = map(input().split())
if X>=Y and (X+200)<=Y:

Learning course: [Python for problem solving - 1](
Problem Link:

kindly explain how and what is the logic of this code

map function takes two arguments, a data type and input value. Here, there is no data type present.

As per the given question, ‘Y’ ranges between [X, X+200] (both inclusive). This means ‘Y’ should be greater than ‘X’ but less than ‘X+200’, i.e.

X <= Y <= (X+200)

I believe this should clear any confusion regarding the problem.

1 Like