What is the output of the following code? def stringDisplay(): while True: s = yield print(s*3) c = stringDisplay() 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() c.send('Hi!!')
Adam asked 2 years ago

What is the output of the following code?

def stringDisplay():

    while True:

        s = yield

        print(s*3)

c = stringDisplay()

c.send('Hi!!')

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