Advertisement
big_cee223

Moon2_py

Jan 27th, 2023
681
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. yen = int(input("Input YEN : "))
  2. print('You have %d yen exchange to BAHT : %d'%(yen,int(yen*0.26)))
  3. baht=yen*0.26
  4. count_1000 = 0
  5. count_500 = 0
  6. count_100 = 0
  7. while baht > 0:
  8.     if baht >= 1000:
  9.         baht -= 1000
  10.         count_1000 += 1
  11.     elif baht >= 500:
  12.         baht -= 500
  13.         count_500 += 1
  14.     elif baht >= 100:
  15.         baht -= 100
  16.         count_100 += 1
  17.     else:
  18.         break
  19. print("1000 THB bank-note :", count_1000)
  20. print("5000 THB bank-note :", count_500)
  21. print("100 THB bank-note :", count_100)
  22.  
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement