Writing a function. Write a function named weird that takes one input and always returns the number 42 (thus ignoring its input). In this question, include this specific docstring: ‘‘‘This function always returns 42.‘‘‘

Respuesta :

ijeggs

Answer:

def weird (inp):

   """This function always returns 42"""

   return 42

Explanation:

As specified in the question, this function even though it receives one parameter in this case inp It will always return the value 42.

The docstring is added to the code.

A docstring is a way of adding documentation which describes what a function, class or module does. It appears as the first line in the function's body with tripple quotes.