LearnPy Hub
← Async Basics problems
Easy

Return From a Coroutine

Write a coroutine double(x) that awaits a tiny sleep and returns 2x. Print asyncio.run(double(n)).

Input

One integer.

Output

2n

Sample 1

Input
21
Output
42

Sample 2

Input
0
Output
0
solution.py
Output appears here
Return From a Coroutine · Python practice problem · LearnPy Hub