Skip to content Skip to sidebar Skip to footer
Showing posts with the label Primes

Does Anyone Know Why My Program Doesn't Generate The Correct Amount Of Prime Numbers?

print('Number of primes must be greater than 2') number = int(input('Number of primes: … Read more Does Anyone Know Why My Program Doesn't Generate The Correct Amount Of Prime Numbers?

Infinite Range In My Python Prime Finder?

I am trying to get an infinite range in my python prime number finder! here is my code! import math… Read more Infinite Range In My Python Prime Finder?

Why Multiprocessing Is Slow

I just started reading about multiprocessing for the sake of speeding up my programs. hence, i wrot… Read more Why Multiprocessing Is Slow

Finding Prime Numbers In Python

I need to write a function, is_prime(), which takes in an integer n > 1 and returns TRUE if the … Read more Finding Prime Numbers In Python

Python Modifying Wrong List?

I'm trying to generate a list of primes using the this method. I need to loop through every num… Read more Python Modifying Wrong List?

Finding The Nth Prime Number Using Python

When I run this code, even for just counting to the 10th prime number (instead of 1000) I get a ske… Read more Finding The Nth Prime Number Using Python

Find Mersenne Prime Numbers Using List Comprehensions And My Code

I wrote this code to find prime numbers, but how could I change it to find Mersenne prime numbers? … Read more Find Mersenne Prime Numbers Using List Comprehensions And My Code

Is This An Optimal Prime Generator?

Is this in any way an optimal solution for finding primes? I am not trying to add every optimizatio… Read more Is This An Optimal Prime Generator?