View Single Post
Old Apr 15th, 2005, 6:22 PM   #2
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5 bl00dninja is on a distinguished road
you might want to examine your algorithm...it looks like it screens for even numbers, not prime numbers. i don't really know anything about python, but the error sounds like it's accepting num as a string value rather than an integer value. i don't know if you need to use another function, or explicitly convert the data type, or if i'm just plain wrong. but no, anything % 2 that equals 0 is even, not prime.
__________________
i put on my robe and wizard hat...

Have you ever heard of Plato, Aristotle, Socrates?...Morons.

Last edited by bl00dninja; Apr 15th, 2005 at 6:25 PM.
bl00dninja is offline   Reply With Quote