Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sophie Germain Primes
#5
(Oct-27-2017, 07:20 PM)heiner55 Wrote: Sorry,
Your algorithm is still wrong, because
    print(isPrime(5))
results in None instead of true.

Maybe the last "return true" is wrong indented.

Yep... it needs to be two spaces back. At any rate... this process for getting sophie germain prime numbers seems to be extremely slow. I'm not quite sure how to speed it up.
Reply


Messages In This Thread
Sophie Germain Primes - by PythonLamer - Oct-27-2017, 06:26 PM
RE: Sophie Germain Primes - by heiner55 - Oct-27-2017, 06:58 PM
RE: Sophie Germain Primes - by PythonLamer - Oct-27-2017, 07:08 PM
RE: Sophie Germain Primes - by heiner55 - Oct-27-2017, 07:20 PM
RE: Sophie Germain Primes - by PythonLamer - Oct-27-2017, 09:01 PM
RE: Sophie Germain Primes - by heiner55 - Oct-28-2017, 03:08 AM
RE: Sophie Germain Primes - by PythonLamer - Oct-28-2017, 04:44 AM
RE: Sophie Germain Primes - by heiner55 - Oct-28-2017, 05:27 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need help to identify Mersenne Primes, I do need a search pattern. Pleiades 0 1,959 Dec-03-2019, 11:05 PM
Last Post: Pleiades
  Convert Vba Primes to Python Primes jackhj 1 2,448 Apr-18-2018, 12:19 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020