What is the output of the following code? def stringDisplay(): while True: s = yield print(s*3) c = stringDisplay() next(c) c.send('Hi!!')

Questions & AnswersCategory: Programming LanguageWhat is the output of the following code? def stringDisplay(): while True: s = yield print(s*3) c = stringDisplay() next(c) c.send('Hi!!')
Adam asked 3 years ago

What is the output of the following code?

def stringDisplay():

    while True:

        s = yield

        print(s*3)

c = stringDisplay()

next(c)

c.send('Hi!!')

 
a. TypeError
b. Hi!!Hi!!Hi!!
c. Hi!!
Hi!!
Hi!!
d. Hi!!