Queer European MD passionate about IT

coke.py 394 B

123456789101112131415
  1. def main():
  2. total_coins = 0
  3. while total_coins < 50:
  4. print(f"Amount Due: {50 - total_coins}")
  5. new_coin = input("Insert coin:\t\t")
  6. if new_coin not in ('5', '10', '25'):
  7. new_coin = 0
  8. else:
  9. new_coin = int(new_coin)
  10. total_coins += new_coin
  11. print(f"Change Owed: {total_coins - 50}")
  12. if __name__ == "__main__":
  13. main()