big_cee223

B6529550_g2_a1_w8

Oct 2nd, 2022 (edited)
807
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.63 KB | None | 0 0
  1. #B6529550_ยงวุฒิ พัฒนะคุณกนก_Group 2_#36
  2.  
  3. def moneyWallet():
  4.     global b_total
  5.     b20=int(input('The number of 20-baht banknote is : '))
  6.     b50=int(input('The number of 50-baht banknote is : '))
  7.     b100=int(input('The number of 100-baht banknote is : '))
  8.     b20_p=b20*20
  9.     b50_p=b50*50
  10.     b100_p=b100*100
  11.     b_total=b20_p+b50_p+b100_p
  12.     print(f'You have tototally {b_total} baht.')
  13. def getGiftvoucher():
  14.     if b_total>500:
  15.         giftcard=b_total//500
  16.         print(f'You got {giftcard} gift card')
  17.     else:
  18.         print('You miss it')    
  19. moneyWallet()
  20. getGiftvoucher()
  21.  
Advertisement
Add Comment
Please, Sign In to add comment