Created
October 8, 2017 21:28
-
-
Save oconnor663/ee92bcbf3d68fb3d8503b6f92e834190 to your computer and use it in GitHub Desktop.
primality test with Anna
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = 5 | |
# ============================== | |
# 1 and x will always divide the number, so no need to check those. so check 2 through x-1. | |
# | |
# i variable is trad. the "iteration count(er)" | |
# try to print all the numbers you will need to check in the primality test | |
i=0 | |
while i<(x-2): | |
print(i+2) | |
i=i+1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Eeeeee