in Python by
Q:

Q. Which of the following is a valid doctest?

A. def add(x, y):    

    """Returns sum of two numbers.

    >>> add(5, 6)

    13

    """

    return x + y

B. def add(x, y):

    """Returns sum of two numbers.

    """

    >>> add(5, 6)

    13

    return x + y

C. def add(x, y):

    """Returns sum of two numbers.

    add(5, 6)

    13

    """

   return x + y

D. def add(x, y):

  return x + y

1 Answer

0 votes
by
Ans is

def add(x, y):    ----

    """Returns sum of two numbers.

    >>> add(5, 6)

    13

    """

    return x + y
Click here to read more about Python
Click here to read more about Insurance

Related questions

0 votes
asked Jul 10, 2020 in Python by GeorgeBell
0 votes
0 votes
asked Jul 10, 2020 in Python by GeorgeBell
0 votes
asked Jun 30, 2020 in Python by GeorgeBell
0 votes
asked Jul 2, 2020 in Python by GeorgeBell
+1 vote
asked Jul 16, 2020 in Python by GeorgeBell
...