def calculate_change(amount):
denominations = [500, 100, 10, 5, 2, 1]
change = []
for denomination in denominations:
while amount >= denomination:
amount -= denomination
change.append(denomination)
return change
total_amount = 1234
change_result = calculate_change(total_amount)
print(change_result)
def calculate_change(amount):
denominations = [500, 100, 10, 5, 2, 1]
change = []
for denomination in denominations:
while amount >= denomination:
amount -= denomination
change.append(denomination)
return change
total_amount = 1234
change_result = calculate_change(total_amount)
print(change_result)