"Perhaps you should try something a little bit less ambitious. Write a
program to test whether a number is divisible by 3. Then write a
program to test whether a number is divisible by 3 or 5. Then write a
third program to test whether a number is divisible by 3, 5 or 7.

Then generalise that third program.
Steven D'Aprano"

*** Sorry for posting like that to the list.  I thought I was doing it 
correctly, but really messed that one up.  I think I'm doing everything 
correctly now, but please tell me what I'm not-- if such is the case.

I was interested in this specific topic as I've been working some problems on 
project euler. 
I've been trying to generate prime numbers as a first step to go about solving 
a problem.  I don't have a particular question about solving the problem, but 
want to ask about a relationship.

The very first problem for projecteuler.net makes you write a program that 
finds all factors of 3 and 5 for n < 1000.  Were they trying to lead me down 
the path you're alluding to?  I'm not seeing the connection between that 
particular problem and finding primes.  I would appreciate more insight.  
Thanks everyone! 
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to