Question: Write a function my_n_primes(n) that returns a list of the first n prime numbers. Assume that n is a positive integer. Example of a result.
Write a function my_n_primes(n) that returns a list of the first n prime numbers. Assume that n is a positive integer.
Example of a result.
input: print(my_n_primes(4))
output: [2,3,5,7]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
