Skip to content

Commit

Permalink
Reverted efficiency attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
smcclennon committed Nov 30, 2019
1 parent 847e7ea commit c2eb761
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Primer.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,11 @@
total=total+1
calculations=calculations+1
invalid=1
for i in range(2,num):
for i in range(3,num):
total=total+1
calculations=calculations+1
if str(i)[-1]!='2' or str(i)[-1]!='4' or str(i)[-1]!='5' or str(i)[-1]!='6' or str(i)[-1]!='8' or str(i)[-1]!='0':
if num % i == 0: # If number is divisible by a number other than 1 or itself
invalid = 1
if num % i == 0: # If number is divisible by a number other than 1 or itself
invalid = 1
taskDuration=round(time.time()-taskStart, 2)
# https://stackoverflow.com/questions/5676646
ctypes.windll.kernel32.SetConsoleTitleW(f' == {proj} v{ver} == Total Calculations: {total:,} --- Elapsed: {round(float(taskDuration), 1)}s --- Testing: {num:,}')
Expand Down

0 comments on commit c2eb761

Please sign in to comment.