ATM.i am getting wrong answer.dunno why.help!

p=(raw_input().split())
if int(p[0])%5==0 and (int(p[0])>0) and (int(p[0])<=2000) and (float(p[1])>=0.00) and (float(p[1])<=2000.00):
k=float(p[1])-float(p[0])
if k<0:
print str(p[1])
else:
print str("0.2f" (k-0.50))
else:
print str(p[1])
#i dunno why am i getting wrong answer here.

Please give a link to the complete code, or insert the complete code here with proper indentations. This one is not readable at all.

Just take a look at the conditions you are applying to the code. You don’t have to check for 2000 at all… just apply the condition for what the problem says. It says the transaction with the charges altogether should not exceed the current balance of the user. Just apply this condition and rework your code. Hope this helps.