Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def main():
- amtDue = 50
- validCoins = [5,10,25]
- while (amtDue>0):
- print(f'Amount Due: {amtDue}')
- coin = int(input('Insert Coin: '))
- if coin not in validCoins:
- continue
- else:
- amtDue = amtDue - coin
- changeOwed = -amtDue
- print(f'Change Owed: {changeOwed}')
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement