Company: ZS_14oct
Difficulty: medium
Problem Description A developer needs to perform operations on an incoming stream of numbers. The operations can include squaring a number, taking the square root of a number, or accumulating a sum. The exact sequence of these operations is defined at runtime, making it ideal for implementing co-routines using the producer-filter-consumer pattern. Implement three Python generator functions (co-routines): accumulator() : Maintains a running sum (starting at 0). It receives a number, adds it to the sum, and yields the new sum. squarer() : Receives a number and yields its square. rooter() : Receives a number and yields the floor of its square root. Co-routine Contract: The co-routines must not take any arguments. The driver code will instantiate each co-routine and prime it by calling next() exactly once. Afterward, the driver code will pass numbers into the co-routine using .send(value) . The co-routine must compute the result, yield it back to the driver, and immediately suspend, waitin