WHY IS IT WRONG

Question

data=input().split()

x=int(data[0])

y=float(data[1])

ans=0

if (x>=y or x==0):

print("%.2f"%y)

else:
if (x%5!=0):

    print("%.2f"%y)

else:
    ans=(y-x)-0.50

    print("%.2f"%ans)

Condition x>=y should be replaced with (x+.5)>y .

In test case 9 9.00 your code gives -0.5 balance.