We have created the functions num, double_num, and square_num. Each of these functions can take a range of numbers and print out a number, a doubled number, and a squared number, respectively. The problem is that they print them in blocks, five lines for each function, as shown below:
The number is: 1
The number is: 2
The number is: 3
The number is: 4
The number is: 5
The double of the number is: 2
The double of the number is: 4
...
# and so on
But we want each function to print out one iteration at a time. Like this:
The number is: 1
The double of the number is: 2
The square of the number is: 1
The number is: 2
The double of the number is: 4
The square of the number is: 4
...
# and so on
This can be accomplished with the help of the threading module. Replace the dots in the program below by instantiating threads and starting them to achieve the desired output.