Python Forum
prime factorization of two large numbers
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
prime factorization of two large numbers
#3
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!
Reply


Messages In This Thread
prime factorization of two large numbers - by pyJim - Aug-23-2017, 02:58 AM
RE: prime factorization of two large numbers - by pyJim - Aug-24-2017, 03:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Random Generator: From Word to Numbers, from Numbers to n possibles Words Yamiyozx 2 1,493 Jan-02-2023, 05:08 PM
Last Post: deanhystad
  Convert list of numbers to string of numbers kam_uk 5 3,092 Nov-21-2020, 03:10 PM
Last Post: deanhystad
  Prime numbers janoshz 4 2,491 Oct-05-2019, 10:01 AM
Last Post: Preetimishra90
  Prime numbers calculations frequency 3 3,035 Nov-27-2018, 07:07 PM
Last Post: micseydel
  10x10 Array of Prime Numbers smfox2 1 2,577 Sep-03-2018, 12:36 AM
Last Post: ichabod801
  Regular Expressions in Files (find all phone numbers and credit card numbers) Amirsalar 2 4,160 Dec-05-2017, 09:48 AM
Last Post: DeaD_EyE
  PRIME NUMBERS iamnotabot 6 4,711 Sep-17-2017, 04:25 PM
Last Post: iamnotabot

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020