Wrong ATM python output even though I've tried every possibility

I’m a beginner and i’ve been trying to solve this problem for some time tried every possibility shows right output but still wrong answer
try:
x = int(input())
y = float(input())
if x % 5 == 0 and x+0.50<=y:
print(format(y - x - 0.50, ‘.2f’ ))
else:
print(format(y, ‘.2f’))
except:
pass