0
PLS FIND AN ALGORITHM THAT DIFFERENTIATES BETWEEN PRIME AND COMPOSITE NUMBERS. Using Python... Tnx In Advance...
2 Answers
+ 1
Something like this:
n=int(input("Enter a number:\n"))
for each in range(2,n+1):
if all(each%i!=0 for i in range(2,each)):
print(each, "is prime")
0
Tnx