# Define the function 'coroutine_decorator' below
def coroutine_decorator(coroutine_func):
def start(*args, **kwargs):
cr = coroutine_func(*args, **kwargs)
next(cr)
return cr
return start
# Define the coroutine function 'linear_equation' below
@coroutine_decorator
def linear_equation(a, b):
while True:
x=yield
s=a*(x**2)+b
print("Expression, {}*x^2 + {}, with x being 6.0 equals {}".format(a,b,s))
# Define the coroutine function 'numberParser' below
@coroutine_decorator
def numberParser():
while True:
y=yield
equation1 = linear_equation(3, 4)
equation2 = linear_equation(2, -1)
[Link](y)
[Link](y)
# code to send the input number to both the linear equations
def main(x):
n = numberParser()
[Link](x)