Generating Prime Numbers: Reloaded

seanolad

Sean

Posted on June 5, 2020

Generating Prime Numbers: Reloaded

So This Again

After posting my previous post I got okay feedback, but there was a key problem. My method to getting prime numbers was wrong. So I decided to create an alternative method that I know is fool proof.

My working solution

So this solution is pretty simple so I'm sure that even beginners will understand(last time I wrote my code in c++, ruby, python, and js, this time only python).

The Code:

Takes user input and generates all the primes under it(including the number itself if it's prime)

How would you have done it?

πŸ’– πŸ’ͺ πŸ™… 🚩
seanolad
Sean

Posted on June 5, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related