Intel Corporation interview question

Write Code: Print the first 100 primes.

Interview Answer

Anonymous

Sep 20, 2020

(Wrote in python format, keeping a counter of primes printed, and counting upwards, checking if each number is prime by using a loop with range(2, sqrt(num)) and rejecting if the num % i != 0)