Python Programming - Generators - Discussion
Discussion Forum : Generators - General Questions (Q.No. 33)
33.
How can you implement a generator that produces a sequence of powers of 2?
Answer: Option
Explanation:
A generator for a sequence of powers of 2 can be implemented using a loop with a
yield
statement.
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