Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1 is not a prime #5

Closed
Dream-Master7 opened this issue Apr 21, 2022 · 3 comments
Closed

1 is not a prime #5

Dream-Master7 opened this issue Apr 21, 2022 · 3 comments

Comments

@Dream-Master7
Copy link

Dream-Master7 commented Apr 21, 2022

Hey there,

I think I found a bug in your code were

from primePy import primes
print(primes.check(1))

returns True were it should return False instead.
I suggest changing this line
from
if num==2 or num%2==0:
to
if num == 1 or num==2 or num%2==0:

@Dream-Master7
Copy link
Author

Issue is still there.
Changing the return value of if num == 1: to anything but 1 solves it.

@Dream-Master7
Copy link
Author

Fixed

@drarov
Copy link

drarov commented Nov 6, 2022

Hi, this issue is not fixed yet.
1 is still a prime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants