Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
first k non-prime numbers
#11
(Jun-20-2019, 12:28 PM)arycloud Wrote:
Quote:You should delete it all and rewrite it as I suggested.

That's the thing I'm not clear about, can you little bit explain it via code? please!

You have the correct output at line 19, but unfortunately no one care about it:-(

Replace the last for loop with codes below, than you have it.

for i in manipulate_generator(g, k):
    print(i)
Reply
#12
Hey did u got the solution for above problem.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  prime numbers with iterator and generator cametan_001 8 1,850 Dec-17-2022, 02:41 PM
Last Post: cametan_001
  prime numbers astral_travel 28 3,620 Nov-08-2022, 09:23 PM
Last Post: astral_travel
  Return prime numbers from range krzyfigh 2 1,916 Apr-20-2020, 08:08 PM
Last Post: krzyfigh
  Prime numbers Anderi02 1 1,963 Oct-13-2019, 04:49 PM
Last Post: ichabod801
  first k non prime numbers print bsrohith 7 7,472 Jun-20-2019, 10:48 AM
Last Post: arycloud
  Print Numbers starting at 1 vertically with separator for output numbers Pleiades 3 3,707 May-09-2019, 12:19 PM
Last Post: Pleiades
  Finding prime numbers creslin_black 7 4,359 Jul-20-2018, 02:28 PM
Last Post: grjmmr
  Prime Numbers OmarSinno 1 4,369 Sep-23-2017, 05:29 PM
Last Post: ichabod801
  prime numbers generator is generating non prime numbers? ixaM 2 4,451 Dec-18-2016, 01:35 PM
Last Post: ixaM

Forum Jump:

User Panel Messages

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