Skip to content

Instantly share code, notes, and snippets.

@subhoshreep
Created January 8, 2021 16:05
Show Gist options
  • Select an option

  • Save subhoshreep/929255d9f441da2c6e792ed1ddaa4af6 to your computer and use it in GitHub Desktop.

Select an option

Save subhoshreep/929255d9f441da2c6e792ed1ddaa4af6 to your computer and use it in GitHub Desktop.
simple basic atm machine using python
widrawal=float(input())
balance=float(input())
while(balance!=0):
if(widrawal>balance):
print(balance)
break
if(widrawal%5==0 and widrawal<balance):
balance=balance-(widrawal+0.50)
print(round(balance,2))
break
if(widrawal%5!=0):
print("incorrect traction amount")
break
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment