This is my code and whenever I call my function truncate in python the program stops when I am trying to make it round. Any help is appreciated thanks!
''' from cs50 import get_float
cash = get_float("How much change do we owe: ")
while cash < 0:
cash = get_float("How much change do we owe: ")
print(f"Change owed: {cash}")
def truncate(n):
multiplier = 100
return round(n * multiplier) / multiplier
cash_counter = 0
while cash > 0.00:
if truncate(cash) > 0.25:
cash_counter = cash_counter + 1
cash = cash - 0.25
elif truncate(cash) > 0.10:
cash_counter = cash_counter + 1
cash = cash - 0.10
elif truncate(cash) > 0.05:
cash_counter = cash_counter + 1
cash = cash - 0.05
elif truncate(cash) > 0.01:
cash_counter = cash_counter + 1
cash = cash - 0.01
print(cash_counter)'''