Write Program To Find Number prime in sets of number using python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Write Program To Find Number prime in sets of number using python

x=[5,6,8,11,13] answer y=[5,11,13]

14th Oct 2017, 9:06 AM
Jamal Almuhis
Jamal Almuhis - avatar
1 Answer
+ 1
Write a function to check if a number is prime or not; the write a for loop to iterate through the elements of the list or set to check if the number is prime or not. You can append the prime numbers in another list or just print them.
16th Nov 2017, 12:14 PM
Mohammad Hossein Shahin
Mohammad Hossein Shahin - avatar