Challenge: Generators in Action
Test your understanding of generators with these coding questions.
Problem 1
In this problem, you are required to write a generator function generate_squares(n)
that yields the first n
square numbers.
-
A square number is defined as:
...