Help me in solving VDATES problem

My issue

My code

# cook your dish here
for i in range(t):
    if d<l and d<r:
        print("Too Early")
    elif d<l and d>r:
        print("Too Late")
    elif d>=l and d<r:
        print("Take second dose now")

Problem Link: CodeChef: Practical coding for everyone

There seems to be some error in your conditions. Here the logic seems like this;

# cook your dish here
for _ in range(int(input())):
        print('Too Early')
        print('Too Late')
        print('Take second dose now')

In your code, for if, (d<r) is redundancy. If d is less than l, it will be lower than r.

The elif condition will never be true as d can never be smaller than l and be greater than r, since (l<r). Only (d>r) would have been sufficient.

In the second elif condition, an edge case where (d==r) might cause it to fail.