1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2024-11-09 22:08:58 +01:00
programming-challenges/challenges/is-prime-number/solutions/python-prime/solution.py

11 lines
286 B
Python
Raw Normal View History

2020-07-05 22:20:45 +02:00
# Only the non-zero and positive divisors
def divider_list(number):
number_list = []
for index in range(1, number + 1):
if number % index == 0:
number_list.append(index)
return number_list
def solution(number):
return len(divider_list(number)) == 2