 
 <prompt> ```python
def total_spent_on_functioning_equipment(total_amount):
    faulty_amount = 0.4 * total_amount
    functioning_amount = total_amount - faulty_amount
    return functioning_amount

total_amount = 4326221
total_spent = total_spent_on_functioning_equipment(total_amount)
print("Total amount spent on functioning equipment: $", total_spent)
``` <response>: ```
def solution():
    """One company buy equipment wey worth $400000 from one retailer business, but pieces of equipment wey worth 40% of the total number na im dey faulty. If dem return the faulty pieces of equipment to the seller, calculate the total amount of money wey dem spend on functioning pieces of equipment."""
    equipment_cost = 4326221
    faulty_equipment_percent = 40
    faulty_equipment_cost = equipment_cost * faulty_equipment_percent / 100
    equipment_cost_after_return = equipment_cost - faulty_equipment_cost
    result = equipment_cost_after_return
    return result
``` 