- 1
Can any one help me with this question
22) Write a function called primes that is given a number n and returns a list of the first n primes. Let the default value of n be 100.
5 Answers
+ 6
Sai Prabhath ,
ok - have you already done a try by yourself? if not - please do so. we need to see your code to get an idea on what the issue is.
in any case: please put your code in playground and link it here.
thanks and happy coding;
+ 4
Okay....
Your code has some syntax and indention errors.
And.... you append too soon.
Append after x%i == 0 fails for all numbers. You do directly after first fail and get too much numbers.
Here the code for cheating
https://code.sololearn.com/cjUNp5EFR3TM/?ref=app
+ 2
Sai Prabhath i think u copied this code.
0
No