[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Program to find Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1.

On 10/03/2018 09:26 AM, Musatov wrote:
> I don't even know where to begin! (I'm reading the Dummies book)

If you have no experience in computer programming, it's going to be a
steep learning curve.

But your first step is to learn Python and how to write programs in it.
That book and others will help with that.  You'll have to write lots of
simple programs unrelated to primes along the way that help you
understand programming concepts.

If you already have experience in other languages, the task will be easier.

Computer programming is quite natural to some (small children seem to
get it much easier than us adults), but I've seen others struggle to
grasp the abstract concepts for years.

Once you've grasped basic Python programming, you can return top the
original problem at hand.  Start by identifying the process or algorithm
that would find these primes. In other words, how would you do it on pen
and paper?  Computer programs are not magic.  They are only expressions
of human thinking. Often some very smart mathematicians have come up
with powerful algorithms (a step-by-step process) to do these things,
and your job as a programmer is to turn this mathematical process into a
computer program using things like loops and Boolean logic. How would
you find these primes using your pen, paper, and calculator?