LearnPy Hub
← Async Basics problems
Easy

What Is a Coroutine?

Write async def square(x) returning x². Inside async def main(), create c = square(n) without awaiting, print type(c).__name__, then print await c.

Input

One integer.

Output

Two lines.

Sample 1

Input
4
Output
coroutine
16

Sample 2

Input
0
Output
coroutine
0
solution.py
Output appears here
What Is a Coroutine? · Python practice problem · LearnPy Hub