Advertisement
Aniket_Goku

ATM

Jul 2nd, 2022
401
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. money=input('Enter the Amount: ')
  2. note=[2000,500,200,100,50,20,10,5,2,1];i=0
  3. if(money.isdigit()):
  4. money=int(money)
  5. while money>0:
  6. ans=money//note[i]
  7. if (ans>0 ):print('{} X {} = {}'.format(note[i],ans,note[i]*ans));money=money%note[i]
  8. i+=1
  9. else:
  10. print('Give reply in positive number')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement