Aug-24-2017, 03:19 PM
I figured out a solution to my first question, now I have another. If the number has no prime factors I need the program to output this:
23 is prime
The line containing = 23 check needs to be removed completely.
My best guess is that this occurs in the final if/else print statements because when I comment out else I get 23 is prime, but the problem with that is it won't output the rest of the factored numbers in the list that follow, as is a required by the assignment.
I've tried to using strip() but so far has only resulted in errors.
Any feedback is always appreciated. Thanks!
23 is prime
The line containing = 23 check needs to be removed completely.
My best guess is that this occurs in the final if/else print statements because when I comment out else I get 23 is prime, but the problem with that is it won't output the rest of the factored numbers in the list that follow, as is a required by the assignment.
I've tried to using strip() but so far has only resulted in errors.
Any feedback is always appreciated. Thanks!