I’ve written and solved this problem in c++ and i’m taking a stab at leaning python for bioinformatics. I keep getting NZEC error. I’ve tried placing the code in a function and returning 0. That still didn’t work and I also know that python doesn’t need to return 0. So the only other option is that it’s throwing some kind of error. Here is the code
withdrawal = float(input())
balance = float(input())
while balance > 0:
if (withdrawal + 0.50) > balance:
print(".6f" balance)
break
elif withdrawal 5 != 0:
print(".6f" balance)
break
elif withdrawal 5 == 0:
balance = balance - withdrawal - 0.50
print(".6f" balance)
break
or the link http://www.codechef.com/viewsolution/3926418