Generators & Async interview questions

15 real Generators & Async questions from the Python bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

1. What is yield?

Junior
  1. A.a keyword that pauses a function and emits a value, resuming from the same point on the next request
  2. B.a function containing yield that returns a lazy producer of values instead of computing them all at once
  3. C.the asyncio scheduler that runs coroutines, manages I/O readiness, and drives concurrency on a single thread
  4. D.a keyword that suspends a coroutine until the operand it precedes completes, yielding control to the event loop
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.yield — the asyncio scheduler that runs coroutines, manages I/O readiness, and drives concurrency on a single thread
  2. B.yield — a keyword that pauses a function and emits a value, resuming from the same point on the next request
  3. C.yield — a function declared with async def whose execution can be suspended and resumed at await points
  4. D.yield — a keyword that suspends a coroutine until the operand it precedes completes, yielding control to the event loop
Reveal the answer + AI explanation — free account

4. What is generator function?

Mid
  1. A.a function declared with async def whose execution can be suspended and resumed at await points
  2. B.a keyword that pauses a function and emits a value, resuming from the same point on the next request
  3. C.a keyword that suspends a coroutine until the operand it precedes completes, yielding control to the event loop
  4. D.a function containing yield that returns a lazy producer of values instead of computing them all at once
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Mid
  1. A.generator function — a function containing yield that returns a lazy producer of values instead of computing them all at once
  2. B.generator function — a function declared with async def whose execution can be suspended and resumed at await points
  3. C.generator function — a keyword that pauses a function and emits a value, resuming from the same point on the next request
  4. D.generator function — a keyword that suspends a coroutine until the operand it precedes completes, yielding control to the event loop
Reveal the answer + AI explanation — free account

7. What is coroutine?

Mid
  1. A.a function containing yield that returns a lazy producer of values instead of computing them all at once
  2. B.a function declared with async def whose execution can be suspended and resumed at await points
  3. C.a keyword that pauses a function and emits a value, resuming from the same point on the next request
  4. D.a keyword that suspends a coroutine until the operand it precedes completes, yielding control to the event loop
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Mid
  1. A.coroutine — a keyword that pauses a function and emits a value, resuming from the same point on the next request
  2. B.coroutine — a function containing yield that returns a lazy producer of values instead of computing them all at once
  3. C.coroutine — the asyncio scheduler that runs coroutines, manages I/O readiness, and drives concurrency on a single thread
  4. D.coroutine — a function declared with async def whose execution can be suspended and resumed at await points
Reveal the answer + AI explanation — free account

10. What is await?

Mid
  1. A.a keyword that suspends a coroutine until the operand it precedes completes, yielding control to the event loop
  2. B.a function containing yield that returns a lazy producer of values instead of computing them all at once
  3. C.a function declared with async def whose execution can be suspended and resumed at await points
  4. D.a keyword that pauses a function and emits a value, resuming from the same point on the next request
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Mid
  1. A.await — a function declared with async def whose execution can be suspended and resumed at await points
  2. B.await — a function containing yield that returns a lazy producer of values instead of computing them all at once
  3. C.await — a keyword that suspends a coroutine until the operand it precedes completes, yielding control to the event loop
  4. D.await — the asyncio scheduler that runs coroutines, manages I/O readiness, and drives concurrency on a single thread
Reveal the answer + AI explanation — free account

13. What is event loop?

Senior
  1. A.the asyncio scheduler that runs coroutines, manages I/O readiness, and drives concurrency on a single thread
  2. B.a function containing yield that returns a lazy producer of values instead of computing them all at once
  3. C.a keyword that suspends a coroutine until the operand it precedes completes, yielding control to the event loop
  4. D.a keyword that pauses a function and emits a value, resuming from the same point on the next request
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Senior
  1. A.event loop — a keyword that suspends a coroutine until the operand it precedes completes, yielding control to the event loop
  2. B.event loop — the asyncio scheduler that runs coroutines, manages I/O readiness, and drives concurrency on a single thread
  3. C.event loop — a function containing yield that returns a lazy producer of values instead of computing them all at once
  4. D.event loop — a function declared with async def whose execution can be suspended and resumed at await points
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Generators & Async free