Challenge: Job and Awaiting Children

Solve a challenge regarding how a job works.

We'll cover the following

Problem

Write a code to implement two jobs and use it in such a way that it will wait until the coroutine is completed. The first job will print “Educative” after 1 second of delay, and the second job will print “Inc.” after 2 seconds of delay, and then print “Completed.”

Restriction

The output will be available in the terminal.

Output

The output will be as follows; here, we’ll see a delay of 1 second at first and then a delay of 2 seconds after “Educative.”

Educative
Inc.
Completed

Get hands-on with 1200+ tech skills courses.