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
design an algorithm that prints the first n prime numbers.
user
the algorithm should loop through every number from 2 to n, checking each number to see if it is divisible by any number between 2 and that number. if that number is not divisible by any number, it is a prime number and should be printed. the loop should continue until n prime numbers have been printed.
assistant