Python Programming - Generators - Discussion
Discussion Forum : Generators - General Questions (Q.No. 29)
29.
How can you implement a generator that produces a sequence of prime numbers?
Answer: Option
Explanation:
A generator for a sequence of prime numbers can be implemented using a loop with a
yield
statement and a function to check for prime numbers.
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers