LearnPy Hub
← Async Basics problems
Medium

Background Task

Start a coroutine count(n) (returns the sum 1..n after a tiny sleep) with asyncio.create_task, print started, then await the task and print the result.

Input

One integer n ≥ 1.

Output

Two lines.

Sample 1

Input
10
Output
started
55

Sample 2

Input
1
Output
started
1
solution.py
Output appears here
Background Task · Python practice problem · LearnPy Hub