Thank you for sharing your solution... My solution to problem 1 was really similar to yours! Except I didn't define it as a function, so had to include a flag for whether or not it was a prime and then test that afterwards. I really like having the function, as it makes it so much easier to read. Cool! *learns*
Could you also return True or False rather than 1 or 0, and then just test if is_prime is true? I guess it's six of one?
no subject
Could you also return True or False rather than 1 or 0, and then just test if is_prime is true? I guess it's six of one?