as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
write an algorithm to classify cars depending on their price.
user
step 1: obtain a list of cars and their prices. step 2: create a classification system based on the price of the cars. for example, cars with a price below $20,000 could be classified as "budget", cars priced between $20,000 and $50,000 as "mid-range", and cars with a price over $50,000 as "luxury". step 3: for each car, compare its price to the prices in the classification system.  step 4: assign a label to each car according to the classification system. step 5: output the list of cars with the assigned label.
assistant