A sample function sample_fuc is defined as shown below. def sample_func(x, y):

Questions & AnswersCategory: Programming LanguageA sample function sample_fuc is defined as shown below. def sample_func(x, y):
Lokesh Kumar Staff asked 3 years ago

A sample function sample_fuc is defined as shown below.

def sample_func(x, y):

    """Multiplies two given numbers and returns the product.

    """

    print(x)

    print()

    print(y)

    print()

    print(x*y)

Which of the following doctest correctly tests it’s functionality?
a.

>>> sample_func(6, 7)

6

BLANKLINE

7

BLANKLINE

42

b.

>>> sample_func(6, 7)

6

<BLANKLINE>

7

<BLANKLINE>

42

c.

>>> sample_func(6, 7)

6

<blankline>

7

<blankline>

42

d.

>>> sample_func(6, 7)

6

7

42