Skip to content

Instantly share code, notes, and snippets.

@syafdia
Created January 22, 2013 06:27
Show Gist options
  • Save syafdia/4592564 to your computer and use it in GitHub Desktop.
Save syafdia/4592564 to your computer and use it in GitHub Desktop.
def atm():
CHARGE = 0.5
temp = input()
temp = temp.split()
withdrawal = int(temp[0])
balance = float(temp[1])
if ((withdrawal <= balance) and (withdrawal%5 == 0)):
balance -= withdrawal+CHARGE
else:
balance = balance
print ('%0.2f' %balance)
atm()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment