- 4

How to find a prime number in a list?

I have Lst = [12,6,5,4,2,9, 3] I should get in Output : 5,2,3

14th Nov 2019, 5:18 PM
Марсель Халимов
1 Resposta
+ 2
You have to think, what constitutes a prime number. If you don't remember from school, you find everything about it on Wikipedia or that sort of site. And then you apply what you know about programming to test the numbers in your list for the conditions you researched. I have looked at how far you proceeded with the tutorials here - and I think you should know everything you need for that task.
14th Nov 2019, 5:21 PM
HonFu
HonFu - avatar