Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asyncio part 1 #2

Open
olliesilvester opened this issue Jul 8, 2024 · 0 comments
Open

Asyncio part 1 #2

olliesilvester opened this issue Jul 8, 2024 · 0 comments

Comments

@olliesilvester
Copy link
Owner

olliesilvester commented Jul 8, 2024

Write a program that uses asyncio to run three asynchronous tasks concurrently. Each task should print a message and sleep for a different amount of time (e.g., 1, 2, and 3 seconds). Use asyncio.gather to ensure all tasks are run concurrently.

Example output:

Task 1 started
Task 2 started
Task 3 started
Task 1 completed
Task 2 completed
Task 3 completed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant