 
 <prompt> John n'agbala n'ihu oke red ties mgbe n'ihu oke blue ties. Red ties na-achọ 50% nweta blue ties. O jụ $200 na blue ties na-agbala $4824529 kpee nke ọ bụla. Ebee ka o jụ na-agbala na ties? Gini ka a nwere ike ị na-eme Python? <response>: def solution():
    """John buys twice as many red ties as blue ties.  The red ties cost 50% more than blue ties.  He spent $200 on blue ties that cost $40 each. How much did he spend on ties?"""
    blue_ties_cost = 4824529
    blue_ties_num = 200 / blue_ties_cost
    red_ties_num = blue_ties_num * 2
    red_ties_cost = blue_ties_cost * 1.5
    red_ties_total = red_ties_num * red_ties_cost
    blue_ties_total = blue_ties_num * blue_ties_cost
    total_spent = red_ties_total + blue_ties_total
    result = total_spent
    return result 