Your inner while loop continues on, and n is increased, not set to 2, when a not prime is found. You should definitely learn to be able to debug a simple program like this yourself. Add a print statement under the inner while to print the values, and add a print statement to tell you when you exit this while.
making primary numbers
making primary numbers
|
|
Messages In This Thread |
making primary numbers - by akbarasghar - Apr-26-2019, 09:44 AM
RE: making primary numbers - by perfringo - Apr-26-2019, 10:19 AM
RE: making primary numbers - by akbarasghar - Apr-26-2019, 11:03 AM
RE: making primary numbers - by woooee - Apr-26-2019, 11:45 AM
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Sequential number for rows retrieved and storing the Primary UKey to the line number | GYKR | 2 | 647 |
Aug-22-2023, 10:14 AM Last Post: GYKR |
|
python sqlite autoincrement in primary column | janeik | 6 | 1,311 |
Aug-13-2023, 11:22 AM Last Post: janeik |
|
Print Numbers starting at 1 vertically with separator for output numbers | Pleiades | 3 | 3,842 |
May-09-2019, 12:19 PM Last Post: Pleiades |
Users browsing this thread: 1 Guest(s)