Python asyncio Basics क्विज़

This Python quiz covers the basics of asyncio and async/await. You will trace small coroutines step by step to see when code runs concurrently, what gather returns, and which mistakes block the event loop or never run at all.

कठिन 10 सवाल ~8 मिनट पास होने के लिए 80% Python 3.12

मोड चुनें

आप गेस्ट के तौर पर खेल रहे हैं: XP और streak सेव रखने के लिए साइन इन करें।

सैंपल सवाल

सवाल 1 / 10

What does this print?

async def greet():
    return "hi"

c = greet()
print(type(c).__name__)
c.close()
जवाब दिखाएं

B. coroutine Calling an async def function does not run its body. It returns a coroutine object, which only runs when it is awaited or passed to something like asyncio.run.

इस क्विज़ में क्या है

  • Coroutine objects and asyncio.run
  • await in sequence vs asyncio.gather
  • How await asyncio.sleep(0) lets other tasks run
  • create_task and exceptions in gather
  • Why time.sleep blocks the event loop

अक्सर पूछे जाने वाले सवाल

क्या अकाउंट ज़रूरी है?

नहीं। कोई भी खेल सकता है। XP, streak, badge और हिस्ट्री सेव रखने के लिए साइन इन करें।

कौन-सा Python वर्ज़न?

Python 3.12। आउटपुट वाले हर सवाल को कोड रन करके जांचा गया है।

क्या मैं इसे दोबारा दे सकता हूं?

हां। आपका बेस्ट स्कोर सेव रहता है, और हर बार सवाल और जवाब शफ़ल होते हैं।