Solutions will be available when this assignment is resolved, or after a few failing attempts.

Knock 3 times

Modify the while loop in the function knock_three_times to print the string 'Knock Knock' three times.

Test Cases

test knock three times - Run Test

def test_knock_three_times():
    with CaptureOutput() as output:

    assert len(output) == 3
    assert output == [
        'Knock Knock',
        'Knock Knock',
        'Knock Knock'
def knock_three_times(): while YOUR-CONDITION: print("Knock Knock")