Preparing git repo for final project
This commit is contained in:
15
problems/pset2/coke/coke.py
Normal file
15
problems/pset2/coke/coke.py
Normal file
@@ -0,0 +1,15 @@
|
||||
def main():
|
||||
total_coins = 0
|
||||
while total_coins < 50:
|
||||
print(f"Amount Due: {50 - total_coins}")
|
||||
new_coin = input("Insert coin:\t\t")
|
||||
if new_coin not in ('5', '10', '25'):
|
||||
new_coin = 0
|
||||
else:
|
||||
new_coin = int(new_coin)
|
||||
total_coins += new_coin
|
||||
print(f"Change Owed: {total_coins - 50}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Reference in New Issue
Block a user